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/O throughout sway-core and forc-pkg and 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-unknown build 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?
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:
I/O
throughoutsway-core
andforc-pkg
and 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.wasm32-unknown-unknown
build 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?