Support compiling `sway-core` and `forc-pkg` to WASM?
- Dominant language
- Rust
- Stars
- 61.4k
- Forks
- 5.4k
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 4
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing all I/O in sway-core and forc-pkg, including how Sway files and git/IPFS dependencies are represented. Assess browser-friendly in-memory alternatives and add a wasm32-unknown-unknown CI build one package at a time. Done means the targeted packages compile for WASM and CI covers them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- build-system, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100