Re:Lightpanda migrate DOM implementation to Zig
by Jweb_Guru on Monday January 12, 2026 @09:37AM
(#46589108)
Respectfully, for browser-based work, simplicity is absolutely not a good enough reason to use a memory-unsafe language. Your claim that Zig is in some way safer than Rust for something like this is flat out untrue.
[ Parent
| on HN ]
Re:Lightpanda migrate DOM implementation to Zig
by hello_moto on Monday January 12, 2026 @10:52AM
(#46590078)
In that blog post, the author said safer than C not Rust.
Re:Lightpanda migrate DOM implementation to Zig
by dnautics on Monday January 12, 2026 @01:37PM
(#46592409)
What is your attack model here? Each request lives in its own arena allocator, so there is no way for any potentially malicious JavaScript to escape and read memory owned by any other request, even if there is a miscode. otherwise, VM safety is delegated to the V8 core.
Re:Lightpanda migrate DOM implementation to Zig
by Jweb_Guru on Thursday January 15, 2026 @09:54AM
(#46633379)
Believe it or not, using arenas does not provide free memory safety. You need to statically bound allocations to make sure they don't escape the arena (which is exactly how arenas work in Rust, but not Zig). There are also quite a lot of ways of generating memory unsafe code that aren't just use after free or array-out-of-bounds in a language like Zig, especially in the context of stuff like DOM nodes where one frequently needs to swap out pointers between elements of one type and a different type.