3 ms·
An explanation of how this works and what makes it novel would be nice. I'm not familiar enough to understand how this is better than Cgo.
by nhooyr 4y ago
An explanation of how this works and what makes it novel would be nice. I'm not familiar enough to understand how this is better than Cgo.
- emidoots 4y agoIt loads the dynamic library at runtime, instead of linking against it, which means it makes cross-compiling with CGO easier as no target C toolchain is needed.
- totallygamerjet 4y agoWhat slimsag wrote is correct. It makes cross-compiling code that needs to call C functions as easy a setting the GOOS and GOARCH and just building. This means no need to worry about building a C cross-compiler. I do want to write an article about how purego works under the hood.
- ignoramous 4y agoI'll be on the lookout. Where's your blog / twitter? I don't see one linked to in your GitHub profile, either.
- totallygamerjet 4y agoI don't have either. I was gonna figure out how to post it after I actually sat down and wrote it lol. I'll probably post it in the golang subreddit and maybe link to it in the README.md since it describes how purego works.
- ignoramous 4y agoWorks. Thanks. Btw, if you haven't considered then, substack.com, hashnode.dev, dev.to are pretty good eng blogging platforms.
- mst 4y agoIf memory serves, dev.to tends to be downranked or outright filtered by a bunch of places. (I have no idea how or why that came about, I've merely observed people having all sorts of trouble getting posts on there visible in aggregators and etc.)