betwixt-labs / bebop

🎷No ceremony, just code. Blazing fast, typesafe binary serialization.
https://bebop.sh/
Apache License 2.0
1.93k stars 40 forks source link

bebopc.wasm #262

Closed andrewmd5 closed 10 months ago

andrewmd5 commented 1 year ago

I've found it pretty annoying that we can't host examples on sites such as Stackblitz. The only workaround to this is to compile the compiler to a WASI module.

Initial experiments are promising. Compiling to target WASM works without much trouble thanks to the dotnet-wasi-sdk. To get it fully working a few changes need to be made:

I'll track progress here. I think this is worth having for 3.0 for the sake of making example apps easier to share.

andrewmd5 commented 1 year ago

Logging works now (50db574), thank you @patriksvensson for putting me on the right track.

All that is left to do is the WASI wrapper for the .wasm build to orchestrate the runtime. That, and write a polling file system watcher for when we’re running under WASM. I’d like the compiler to be 1:1 with native.

andrewmd5 commented 10 months ago

implemented in #288