News for hackers. Stuff that matters.
Re:Is Rust web yet? Not really by pcwalton on Wednesday May 28, 2014 @08:22PM (#7813885)
> Not really. Any time you using a `Vec<T>` or a `String` type, you'll be heap allocating.

Well, we have the SmallVec type to avoid this if you can bound the size of your vectors. I would also like to introduce scratchpad allocators at some point, which should allow you to avoid heap allocations even for those.

Either way, there are many ways you can avoid heap allocations entirely. For example, my NES emulator does not call malloc() during gameplay, at all.

Re:Is Rust web yet? Not really by burntsushi on Wednesday May 28, 2014 @08:51PM (#7813974)
Oh cool, I didn't know about `SmallVector`! That's clever.

> Either way, there are many ways you can avoid heap allocations entirely. For example, my NES emulator does not call malloc() during gameplay, at all.

Definitely. Executing searches from `regex!` expressions won't heap allocate either. :-) (Sans the return value, but maybe that can be avoided too.)