4 ms·
Is there somewhere to read about how rust is tackling this problem?
by mmillin 7y ago
Is there somewhere to read about how rust is tackling this problem?
- cesarb 7y agoIt seems to be described in this Rust RFC: https://github.com/rust-lang/rfcs/blob/master/text/2116-alloc-me-maybe.md https://github.com/rust-lang/rfcs/blob/master/text/2116-allo...
- steveklabnik 7y agoA short overview: 1. Rust the language knows nothing about allocation. If you care about this behavior, it mostly limits the code of others' that you can use, but you can always write your own versions of things that respect fallible allocations. 2. Rust's standard library assumes memory is infallible. This is partially because it's a good default, and partially because our allocator API was not ready yet. 3. We've been working on the allocator API. 4. We have a rough plan for parameterizing data structures over allocators. 5. If this topic is of interest to you, https://github.com/rust-lang/wg-allocators https://github.com/rust-lang/wg-allocators is where to get involved.