2 ms·
> Would love to hear from a Rust contributor why that is and what's being scheduled to be done about it. I haven't spent time with the code yet, so I can't com
by steveklabnik 12y ago
> Would love to hear from a Rust contributor why that is and what's being scheduled to be done about it.
I haven't spent time with the code yet, so I can't comment. It shouldn't be the runtime, though, as our runtime is about as big as C or C++'s. My first thought would be that Vec's growth factor may be poor in this instance, but without reading the code, who knows.
> Rust is... ??
Rust statically links everything but glibc by default. Experimental support for musl was added last week.
- pnathan 12y agoOh, cool! Thanks for the information!
- steveklabnik 12y agoNo problem. Doing a valgrind run on the sample, let's see how it goes.
- pnathan 12y agoWhat did you find out? When I scanned through the code, I didn't see anything jump out at me as being Wrong.
- madez 12y agoI read more than once that rust has no runtime. Could you please clarify whether it has a runime, and if it does, what it consists of?
- steveklabnik 12y agoSo, basically _every_ non-assembly programming language has a runtime. Even C and C++. But not all runtimes are created equal. Languages like C, C++, and Rust have a very minimal, no setup required runtime. Other, higher level languages often have something significantly more heavy. People will sometimes say "no runtime" to mean the class of languages which have very small runtimes. Rust's runtime is here: https://github.com/rust-lang/rust/tree/master/src/rt https://github.com/rust-lang/rust/tree/master/src/rt and https://github.com/rust-lang/rust/tree/master/src/libstd/rt https://github.com/rust-lang/rust/tree/master/src/libstd/rt As you can see, it's very, very small. It mostly handles things like unwinding, at_exit handlers, and the like.