4 ms·
It works for pure Rust code but once you bring in C, you need another tool chain too. Same as Go, as far as I know. Zig has both beat right now, as you do not
by steveklabnik 5y ago
It works for pure Rust code but once you bring in C, you need another tool chain too. Same as Go, as far as I know.
Zig has both beat right now, as you do not need anything else in either case.
- oefrha 5y agoOh, my bad, now that I think about it, all my Rust projects have -sys dependencies so I somehow assumed a cross toolchain is always required.
- steveklabnik 5y agoYeah. C deps are culturally tolerated by Rustaceans more than Gohers, so it can feel like this even if it isn’t literally the case.
- glandium 5y agoEven if you don't bring in C, you need a cross linker and some libraries to link against. Rust doesn't come with those, except maybe for the mingw target.
- steveklabnik 5y agoI don't think of downloading the libraries as being a "cross toolchain", but that is true. Common cross-compiled components default to lld, which is a cross linker. That said, yes, there are some *s here depending on what exactly you're doing.
- glandium 5y agoAFAICT, rust doesn't ship lld, though.
- steveklabnik 5y agoIf you are using the various ARM targets or wasm, it'll also include the llvm-tools component of rustup, which does.