sway
sway copied to clipboard
Support compiling `sway-core` and `forc-pkg` to WASM?
This is a bit of a moonshot issue and by no means a priority, but I've been meaning to open it for a while and would likely enable some pretty cool stuff (e.g. in-browser compilation, deploying from the browser, etc).
Some steps that come to mind in enabling this:
- Review all
I/Othroughoutsway-coreandforc-pkgand consider browser-friendly alternatives. This would likely require support for handling in-memory representation of sway files, seeing if it's possible to compile git/ipfs deps to WASM, etc. - Add a
wasm32-unknown-unknownbuild job to CI. Add one package at a time to avoid having to overhaul the whole repo in one PR.
On a related note: cc @JoshuaBatty is doing something like this a requirement to support Sway in vscode.dev? Or they support native plugins somehow?
I'm not sure just yet, @sdankel is going to look into this for the current milestone. In-browser compilation certainly sounds juicy though.