You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experimenting with tinygo having some fun prototyping a go wasm application hosted by wasmtime-java. Unfortunately, I hit a bug/missing feature when trying to access the memory: kawamuray/wasmtime-java#21. As described in that issue, tinygo cannot compile in reactor mode, hence preventing wasmtime-java to access its memory. Although this might be recognized as a limitation of the engine (apparently others, at least from the documentation, can switch the usage mode independently from the exports https://wasmedge.org/book/en/dev/go.html#a-simple-function-run), I think it would be nice if tinygo can support the reactor mode.
I tried to prototype the support myself following what was done for clang https://reviews.llvm.org/D62922 and this is roughly what I needed to come up with a correct export:
Patch manually wasi.json adding the ldflag "--entry=_initialize"
Hi all,
I've been experimenting with tinygo having some fun prototyping a go wasm application hosted by wasmtime-java. Unfortunately, I hit a bug/missing feature when trying to access the memory: kawamuray/wasmtime-java#21. As described in that issue, tinygo cannot compile in reactor mode, hence preventing wasmtime-java to access its memory. Although this might be recognized as a limitation of the engine (apparently others, at least from the documentation, can switch the usage mode independently from the exports https://wasmedge.org/book/en/dev/go.html#a-simple-function-run), I think it would be nice if tinygo can support the reactor mode.
I tried to prototype the support myself following what was done for clang https://reviews.llvm.org/D62922 and this is roughly what I needed to come up with a correct export:
wasi.json
adding the ldflag"--entry=_initialize"
_start
to_initialize
: https://github.com/tinygo-org/tinygo/blob/release/src/runtime/runtime_wasm_wasi.go#L15If you want I can also provide a proper PR, but i need some guidance :)
The text was updated successfully, but these errors were encountered: