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

Yeah, the question is, how much can you realistically not use those features? I don't actually know. You don't have to give up any of the Rust language.

It's true that you need to ship malloc/free, but that can be really tiny too; https://github.com/fitzgen/wee_alloc is less than a kilobyte.




> You don't have to give up any of the Rust language.

I don't know Rust that well, but what about unwinding and multithreading for example - don't you need to give those Rust features up if you don't want to ship any runtime code?

> It's true that you need to ship malloc/free, but that can be really tiny too

True, yeah. It's a tradeoff, though, tiny mallocs will be much slower than an optimized malloc (like dlmalloc) on real-world benchmarks.


Rust doesn't have a runtime, so there's no runtime code to ship in the first place. It's as low level as C, but with a modern syntax and accompanying core and standard libraries. Thread support is done by using existing OS primitives for threading.




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

Search: