4 ms·
I wonder how this is deployed to presumably a large number of hosts? Do you build a distribution package out of your Rust build and ship that? If so, what about
by boris 4y ago
I wonder how this is deployed to presumably a large number of hosts? Do you build a distribution package out of your Rust build and ship that? If so, what about the Rust standard library? Though I believe some distributions do provide a package for the Rust standard library, but that means one also has to use the packaged rustc/cargo, which tends to lag behind quite a bit.
- pornel 4y agoYes, the distribution package is built with `cargo deb`, which automatically makes a suitable binary package. It doesn't need Rust in production. Rust's standard library is compiled into the executable. Its size is negligible, especially with link-time-optimizations.
- nicoburns 4y agoRust's standard library is statically linked. Rust binaries typically only require libc (and can be compiled with musl to avoid that dependency too).
- 0x457 4y agoRust doesn't have stable ABI, so distributions don't provide "standard library", they provide the toolchain you use to build your rust packages. Emphasis on packages because that's the use-case for toolchain provided by distro and not local development. In the end, you end up with a binary that is statically linked, except for `glibc` (unless you use libc like musl) and whatever C library you choose to dynamically link against. Since this is an in-house project, they can build their packages with whatever toolchain they choose and distribute packages for deployment. So whatever toolchain provided by distro is irrelevant unless this packages is part of the distro's official package repository (which it isn't in this case).