Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




I 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?


So, 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 and 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.


Oh, cool! Thanks for the information!


No problem. Doing a valgrind run on the sample, let's see how it goes.


What did you find out? When I scanned through the code, I didn't see anything jump out at me as being Wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: