Anyone know how to create reactors with wasi-sdk-11? The release notes say support has been added, but I can't figure out how to actually compile one. I tried passing -mexec-model=reactor to clang while linking, but I just get unknown argument.
Ah, the wasi-libc has reactor support, but the packaged clang in the latest wasi-sdk release doesn't yet.
Sorry for the confusion there. We'll hopefully tag a new release shortly, which will include an updated clang including reactor support
I think I figured out the flags to do it manually for now, would be great to have the proper version though!
This seems to work: -nostartfiles -Wl,-e,_initialize $(WASI_SDK_PATH)/share/wasi-sysroot/lib/wasm32-wasi/crt1-reactor.o
Very happy that reactors exist, though, I'm working on making a kind of game engine built around WASM and it turns out that reactors exactly fit the model I meant to use anyway.
Last updated: Dec 23 2024 at 12:05 UTC