Question about how globals are stored in native Wasm code. Wasiclang and rust compilation to wasm both seem to store global variables in the heap, but it seems that if you generate Wasm files directly (for example with wasm-opt -ttf) and compile them using Lucet/Cranelift, it stores globals in a separate memory space. Can anyone confirm this or otherwise shed some light on why globals seem to sometimes be stored in the heap, but other times get their own memory space? Also perhaps point me towards where I could learn more about this global memory space (how large is it, how it is set up, etc).
Last updated: Dec 23 2024 at 12:05 UTC