I would like to define WebAssembly globals in C code, something like
int __attribute__((wasm_global)) myGlobal = 5;
that would then emit a
(global $myGlobal i32 (i32.const 5))
into the build. Setting and reading the variable would then emit global.get and global.set, and taking an address &myGlobal would then be forbidden at compile time. Is there a way to do that today, or would it be possible to add?
I would like to define WebAssembly
globals in C code, something likethat would then emit a
into the build. Setting and reading the variable would then emit
global.getandglobal.set, and taking an address&myGlobalwould then be forbidden at compile time. Is there a way to do that today, or would it be possible to add?