Re:Kerla: Monolithic kernel in Rust, aiming for Linux ABI co...
by abendstolz on Monday October 25, 2021 @12:21PM
(#28989626)
Thanks for correcting my error.
I've never checked core before, so I did when checking up for this discussion.
I somehow missed Result. Silly me didn't search on that page, but ofc I found it on std
https://doc.rust-lang.org/std/result/index.html
Also thanks for clarifying that values of Result can be stack-only!
Add to that that several operating systems will lie about whether you're out of memory, so the 'error' or failure will often not be on the Result() value but come in a SIGKILL instead, it's just adding complexity.
People that are actually worried about it and no how to deal with it, will be coding with a different style and can use the alloc library where/when they need to. (at least when it gets stabilized in Rust)
[0] https://doc.rust-lang.org/core/result/