SafeAllocator on wasm32-wasi (opens in new tab)
There is this in std/start.zig: const use_safe_allocator = !is_wasm and switch (builtin.mode) { .Debug, .ReleaseSafe => true, .ReleaseFast, .ReleaseSmall => !builtin.link_libc and builtin.single_threaded, // Also not ideal. }; What is the rationale behind the !is_wasm check? I can’t find any unsupported feature in the implementation, but maybe I’m missing something. Maybe it is because wasm programs usually aren’t long-lived, or to save memory, or something along those lines?
Read the original article