4 ms·
It's not usually the standard library or dependencies that create the issues I've seen. The teams I work with producing Go tools (across multiple companies) inv
by AlotOfReading 1y ago
It's not usually the standard library or dependencies that create the issues I've seen. The teams I work with producing Go tools (across multiple companies) invariably require carefully orchestrated dev environments that are nigh-unreproducible. It's 50/50 on whether I can actually build a random project first try without reading the instructions if CGO is involved, which seems to be all of them.
My experience with random rust projects is that they usually "just build", with limited exceptions like weird embedded stuff.
- 0x696C6961 1y agoRust projects which depend on C libs have very similar issues.
- timschmidt 1y agoWell yeah, because C has those issues. People like to clown on the Rewrite It In Rust attitude, but it comes with real benefits.
- treyd 1y agoI haven't experienced this. Rust's build system allows you to automate most of the pain in building/bundling those dependencies, so it's just up to the builder to have the right headers (if they're not bundled). That makes it no worse than meson C/C++ builds. In Go, it doesn't have any of that so it depends on the end builder of the binary to be aware of all the C dependencies and manually manage integrating the cgo configuration into their build process.
- estebank 1y agoIts highly dependent on the kind of project. A few years back libxml and libxmlsec1 were a consistent pain in the neck for me. I don't know about now, I simply moved on from the project that needed me to interact with them.
- joshmarinacci 1y agoI don’t hate the C language. I hate the C compiler (and the rest of the toolchain). Anything that helps me not interact with the C compiler is a huge win.
- hu3 1y agoAgain, I disagree. CGO is rarely needed for Go projects. And is actively discouraged by the community.
- AlotOfReading 1y agoDon't know what to tell you, it's just my experience. I see stuff like this: https://github.com/discord/lilliput/blob/master/cgo.go https://github.com/discord/lilliput/blob/master/cgo.go far more commonly in corporate Go code than Rust.
- Thaxll 1y agoI worked for 10 years with Go and almost never seen a cgo dependcy, it's far more common in Rust, it's not even comparable. Rust replaces tons of c/c++ so it has more ffi. The vast majority of Go code, like 99% doesn't have a single cgo dependency.