-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support WASM Architecture #5694
Comments
cheggaaa/pb#140 should fix |
Update: With #5871, #5872, libp2p/go-reuseport#54 and everything in
Gets to:
So it builds! And even reads the api file! (very slowly, probably because the generated wasm binary is 39M) From this point it should be possible to start creating a wrapper for the constructor exposing more useful things to JS so it's possible to interface with this in browser, then implement datastore backed by some browser storage and libp2p transport wrapping js websockets. |
Some progress has been made in #5878 - go-ipfs now runs in browsers and talks to the outside! |
So Go now Supports targeting WASM, but with certain limitations (like not having 'normal' syscalls). It's very low priority and probably a bit of work, but would be a nice 'benchmark' of portability.
First step would be to make the thing compile at all, currently stack of errors I get is down to:
Built with
GOOS=js GOARCH=wasm go build -tags="nofuse purego" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=47e9466ac" -o "cmd/ipfs/ipfs" "github.com/ipfs/go-ipfs/cmd/ipfs"
Next step would be to write some transport to talk to outside nodes.
/ws
//wss
should be easy to wrap.The text was updated successfully, but these errors were encountered: