Stream: wasi

Topic: Reactors


view this post on Zulip Dag Ågren (Oct 17 2020 at 17:16):

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.

view this post on Zulip Dan Gohman (Oct 17 2020 at 17:45):

Ah, the wasi-libc has reactor support, but the packaged clang in the latest wasi-sdk release doesn't yet.

view this post on Zulip Dan Gohman (Oct 17 2020 at 17:45):

Sorry for the confusion there. We'll hopefully tag a new release shortly, which will include an updated clang including reactor support

view this post on Zulip Dag Ågren (Oct 17 2020 at 19:12):

I think I figured out the flags to do it manually for now, would be great to have the proper version though!

view this post on Zulip Dag Ågren (Oct 17 2020 at 19:12):

This seems to work: -nostartfiles -Wl,-e,_initialize $(WASI_SDK_PATH)/share/wasi-sysroot/lib/wasm32-wasi/crt1-reactor.o

view this post on Zulip Dag Ågren (Oct 17 2020 at 19:13):

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