Hacker News new | ask | show | jobs
by zurn 3136 days ago
Rust has a big standard library that is linked by default. Using it with no runtime is pretty rough going and is usually done only by people targeting bare metal microcontrollers or OS kernels, because it loses a lot of the power normally available in the language.
2 comments

You may be confused about the difference between a standard library and a runtime. Rust has a standard library (which can be disabled in resource-constrained environments) but no runtime - there's nothing to initialize or tear down, code is just executed. Languages like Go, Python etc. have a runtime (which includes for example the garbage collector.)
What power are you missing? I'm usually surprised by how much still exists without libstd. The biggest thing is collections.
I have to confess to not actually being a Rust user. But, isn't for example std::io used by most Rust programs?
std::io doesn't use a runtime, it just makes system calls directly.

(It used to use a runtime because it had optional M:N threading, but that was removed when it turned out not to be any faster than 1:1 threading, caused all sorts of problems with stack switching, and of course pulled in a problematic runtime.)