Skip to content
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

Dmsg for WASM / browser runtime #295

Open
0pcom opened this issue Jan 11, 2025 · 0 comments
Open

Dmsg for WASM / browser runtime #295

0pcom opened this issue Jan 11, 2025 · 0 comments

Comments

@0pcom
Copy link
Collaborator

0pcom commented Jan 11, 2025

Golang’s net package (used by dmsg) does not directly support WebAssembly (Wasm) due to the limitations of the WASI (WebAssembly System Interface) API. Specifically, WASI API does not fully implement network sockets.

However, third-party libraries can provide the necessary functionality. One such library is dispatchrun/net (formerly stealthrocket/net), which uses the go:wasmimport compiler directive to allow the use of net.Dial and net.Listen on supported Wasm hosts.

This (potentially) enables the use of net.Dial, the creation of net/http servers, and other network-related functionality.

https://github.com/dispatchrun/net

We should further investigate this for browser-based dmsg applications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant