Comment by Measter
20 days ago
Memory allocations in Rust are also always done explicitly, but Rust's library types don't have APIs that allow you to get it wrong.
20 days ago
Memory allocations in Rust are also always done explicitly, but Rust's library types don't have APIs that allow you to get it wrong.
Rust doesn't (yet) have the same level of control over allocators as Zig does.
The Rust language has exactly that level of control. Rust's Alloc and STD implementations do not yet provide it.
That's like saying Rust has GC because GC libraries/runtimes can be implemented in/for Rust. Rust recognizes allocations on a language basis, but does not provide the same level of control over allocations on a language basis as Zig does. For instance, there is no stable interface for custom allocators for alloc/std.
9 replies →