4 ms·
It remains that easy until your Go/Rust project relies on libraries written in other languages, say C. (This holds true for JS/python/… too.)
by liftm 5y ago
It remains that easy until your Go/Rust project relies on libraries written in other languages, say C.
(This holds true for JS/python/… too.)
- cure 5y agoRight. But even then it does not become that much worse. Just tell Go to use the appropriate cross compilation chain for the C bits, e.g. `apt install gcc-aarch64-linux-gnu` and set the `CC=aarch64-linux-gnu-gcc` environment variable to compile for arm64. Compilation becomes a bit slower, but it's still manageable. It's that easy thanks to the foundations laid by the distribution that ships a solid cross-compiler setup (in this example, thank you Debian!) and of course the brilliance of the Go design and toolchain.
- creamytaco 5y agoRelying on libraries written in C is not an issue if the library doesn't make assumptions about / isn't tied to, a particular architecture. Some do but most (especially newer codebases written to C11 and beyond) don't.
- ajdlinux 5y agoThere's also the issue of performance-optimised assembly routines, which impacts many native libraries doing things such as crypto, image processing, etc.