Remix.run Logo
▲ happyPersonR a day ago

.... i can understand being like .... proactive. But maybe the failable allocations thing leading to writing your own allocator is premature? idk ...

it's one of the core parts of the security model....

i would hope because there's such strict controls in rust for memory management that you wouldn't have the possibility for allocation fails to begin with? idk ?

if it's a low memory situation, i think there's other ways to handle this ... but i can understand not wanting anything to change other than the language.

but maybe it's something that gets better?

▲kevin_b_er 17 hours ago | parent [-]

Then Rust could not be any part of the init executable. A failed allocation would be a kernel panic.

▲happyPersonR 3 hours ago | parent [-]

Since 2017 rust has had a way to throw and error and you can handle the error instead of panic.

https://github.com/rust-lang/rust/issues/46865

Couple of other ways to do it too.

That being said if you have to go this route maybe the article is oversimplifying the decision?

Another benefit might be not having to deal with all the baggage std lib brings that you don’t use and all the resultant cves?