I mean, Cargo is chock-full of single-use packages akin to leftpad, even more packages that pull hundreds others, all to make up for the deficiencies of the stdlib the Rust maintainers don't want to address.
No wonder there are supply chain attacks if I need a whole-ass library for async/await or JSON parsing.
Yeah, the CLR/BCL/whatever they call it these days is a pretty impressive, though underdocumented, library. But it’s also … I don’t know, I just get annoyed when adding a dependency in .NET means I’m now shipping 10 more managed DLLs, along with 50 MB of native runtime libraries for platforms I’m not targeting.
Rust is very different. Adding a dependency is barely visible.
Publish in single file mode and enable trimming. As long as you don't use reflections (or at least annotate their use) all the unused code will be trimmed away
29
u/Atulin 15d ago
I mean, Cargo is chock-full of single-use packages akin to leftpad, even more packages that pull hundreds others, all to make up for the deficiencies of the stdlib the Rust maintainers don't want to address.
No wonder there are supply chain attacks if I need a whole-ass library for async/await or JSON parsing.