Re:Zig self hosted compiler is now capable of building itself
by zigger69 on Sunday April 17, 2022 @08:21AM
(#31060352)
You can execute arbitrary code on drop operations by implementing `std::ops::Drop` for a type.
[ Parent
| on HN ]
Re:Zig self hosted compiler is now capable of building itself
by pornel on Monday April 18, 2022 @10:00PM
(#31079078)
A `.deinit()` function could also run some arbitrary code that does weird and unexpected things. The point is that reasonable people don't abuse functions like that — if they do abuse, don't use their code. Neither Rust nor Zig is a sandbox that could stop actively stupid/malicious code.