Re:Ruma, a Matrix homeserver written in Rust
by ambrop7 on Monday July 04, 2016 @12:45PM
(#12031712)
Well yes, I do want to avoid any unnecessary overhead, and specifically I want to avoid any dynamic memory allocation. Consider a design for a hard real-time system and/or microcontrollers where you want to have all memory allocated statically. In C++ this is pretty easy to do if you want it (hint: don't use shared_ptr).
[ Parent
| on HN ]
Re:Ruma, a Matrix homeserver written in Rust
by vertex-four on Monday July 04, 2016 @01:04PM
(#12031811)
I'd agree that Rust doesn't manage to entirely avoid dynamic memory allocation unless you use unsafe code... but as you say, you can't use the safer parts of C++ without running into the same issues.
There's also a chance that you might be able to encapsulate your unsafe code behind safe abstractions, and Rust can help prove the rest is memory-safe.