Rust seems like a sound choice in that regard because it's not garbage collected, so you're not wasting some RAM overhead just to avoid needing to do extra work, and it doesn't have C-style struct packing issues. If you don't specify the layout you need for a user defined type, Rust will assume you are OK with it re-arranging your data structure to be smaller / faster.
If you're willing to put in some work you can often go further with this in Rust than in other "systems programming" languages too. For example C++ Strings have the "Small String optimisation", exactly how this works varies but e.g libc++ (on a modern 64-bit server) String is a 24 byte data structure which can hold up to 22 bytes of textual data inline without yet needing a heap allocation. So if you do a lot of work modifying small amounts of text, Rust's built-in String isn't as efficient as a libc++ String, but the CompactString type from a popular Rust crate is also a 24 byte data structure yet it holds a more impressive 24 bytes of text before needing heap allocation.
Rust seems like a sound choice in that regard because it's not garbage collected, so you're not wasting some RAM overhead just to avoid needing to do extra work, and it doesn't have C-style struct packing issues. If you don't specify the layout you need for a user defined type, Rust will assume you are OK with it re-arranging your data structure to be smaller / faster.
If you're willing to put in some work you can often go further with this in Rust than in other "systems programming" languages too. For example C++ Strings have the "Small String optimisation", exactly how this works varies but e.g libc++ (on a modern 64-bit server) String is a 24 byte data structure which can hold up to 22 bytes of textual data inline without yet needing a heap allocation. So if you do a lot of work modifying small amounts of text, Rust's built-in String isn't as efficient as a libc++ String, but the CompactString type from a popular Rust crate is also a 24 byte data structure yet it holds a more impressive 24 bytes of text before needing heap allocation.