Re:Moving from TypeScript to Rust / WebAssembly
by steveklabnik on Thursday July 09, 2020 @09:06AM
(#23779742)
While this is true, this doesn't inherently mean you can't do this pattern. https://crates.io/crates/typed_arena for example. It depends on exactly how allocations and your data structure are tied together.
[ Parent
| on HN ]
Re:Moving from TypeScript to Rust / WebAssembly
by laurencerowe on Thursday July 09, 2020 @11:08AM
(#23781082)
It would be amazingly handy if someday it was possible to direct Rust to make all heap allocations under a certain block within an arena. At the moment it looks like you have to rewrite any third party code that makes heap allocations to use the arena explicitly at each allocation.
Re:Moving from TypeScript to Rust / WebAssembly
by steveklabnik on Thursday July 09, 2020 @11:27AM
(#23781296)
Yep, it would. There’s certainly a bunch of work to do here still.