Re:Lightpanda migrate DOM implementation to Zig
by kryps on Monday January 12, 2026 @08:18AM
(#46588078)
No, you can't do the same thing in Rust, because Rust crates and the standard library generally use the global allocator and not any arena you want to use in your code.
[ Parent
| on HN ]
Re:Lightpanda migrate DOM implementation to Zig
by IshKebab on Monday January 12, 2026 @04:03PM
(#46594273)
I mean you can store the nodes in an arena so you don't have to deal with the borrow checker getting upset with your non-tree ownership structure. That's the context. We weren't talking about arena use for speed/efficiency purposes. In that case you are right; it's much more awkward to use custom allocators in Rust.