7 ms·
I use alpine for this [1] reason, but I will admit that this is a premature-optimization. I haven’t actually ran into the problem myself. —— Your code is grea
by mmulet 9mo ago
I use alpine for this [1] reason, but I will admit that this is a premature-optimization. I haven’t actually ran into the problem myself.
——
Your code is great, I do basically the same thing (great minds think alike!). The only thing I want to add is that cgo supports pkg-config directly [2] via
// #cgo pkg-config: $lib
So you don’t have to pass in linker flags manually. It’s incredibly convenient.
[1]https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged https://stackoverflow.com/questions/57476533/why-is-statical...
[2]https://github.com/mmulet/term.everything/blob/def8c93a3db25211be0a37ab8bb44567ac5b7218/framebuffertoansi/ChafaInfo.go#L3 https://github.com/mmulet/term.everything/blob/def8c93a3db25...
- johnisgood 9mo agoThanks! I did not use pkg-config because the compiled .c is the one I have written specifically for this Go program. :D I did it all on my own system as well (Void Linux).