i ran through the rust “getting started” page (https://www.rust-lang.org/learn/get-started). it's a hello-world project that has the rust crab mascot say hello, and consists of 10 lines of code actually written.

it results in pulling in 25 separate dependencies totalling up to 97 megabytes.

for reference the entire cowsay source is 168 lines/4 kilobytes of perl.

@nytpu Not to say that's not surprising, but perl packages on my machine appears to be 162MB. :/

@cstanhope But that's for all perl stuff on your system, cowsay itself uses precisely zero (0) external dependencies, only perl core modules that are always bundled with every perl install. These rust deps are all required by the hello-world program specifically, and even worse they're all indirect dependencies that I didn't even explicitly add.

@nytpu True, it's not an apples to apples comparison. I didn't try to exclude perl packages I never explicitly installed. So, does the resulting executable need all 97MB? Or is that just from all the build cruft?

(And I don't mean to bother you. I've been meaning to go and learn some Rust, so maybe I should go do that now and not pester somebody on the internet.)


@cstanhope @nytpu Doesn't answer the original question, but Rust has been used for a winning 4k intro:

So it's not like it can't be small, it's just that the package ecosystem has issues.
The bigger issue to me is that if you build a different executable, all the shared dependencies are compiled again. Compiling any Rust package on Guix is a bit of a nightmare.

· · Web · 2 · 0 · 1

@csepp @cstanhope I always have to emphasize this, but I don't hate rust itself, I hate the rust community for a variety of reasons, one being their obsession with emulating NPM and javascript dependencies, and also for their hubris to say "rewrite everything in rust" (I've never seen another community where the majority unironically claims that their language is perfect for all use-cases). I also dislike the lack of a spec, and the rust team's proclivity of "add more features before fixing and/or improving existing ones." Also dislike that you need to use proprietary webshit github to be able to use crates.io (not even Go stoops low enough to force you to do that)

Agreed! #rust's #cargo build-system is cruft. Even when reusing a crate from the very same filesystem-place, it gets compiled again for each package using it
@cstanhope @nytpu

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.