Hacker News new | ask | show | jobs
by moosingin3space 3320 days ago
> The addressable memory space doesn't include code, globals, stack, etc

Really? In that case, how does a language like Rust, where stack allocation is used regularly, compile to WASM?

1 comments

GP is referring to the call stack. It is still possible to use the WASM heap as a stack, by maintaining a stack pointer and a base pointer.