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

WASM compatibility #57

Open
mankinskin opened this issue Aug 23, 2020 · 1 comment
Open

WASM compatibility #57

mankinskin opened this issue Aug 23, 2020 · 1 comment

Comments

@mankinskin
Copy link
Contributor

If this crate was WASM compatible, it would be possible to serve WASM packages to web clients, running the crate locally. This could reduce overhead, as there was no server between client and exchange API.

@mankinskin
Copy link
Contributor Author

mankinskin commented Aug 23, 2020

Currently, cargo build --target=wasm32-unknown-unknown fails because of a dependency on net2, as described in this issue. And cargo tree reveals that this is a dependency because of tokio:

cargo tree | grep net2 -A 4 -B 20
│   │   │   │   └── hashbrown v0.8.2
│   │   │   │       [build-dependencies]
│   │   │   │       └── autocfg v1.0.1
│   │   │   │   [build-dependencies]
│   │   │   │   └── autocfg v1.0.1
│   │   │   ├── slab v0.4.2
│   │   │   ├── tokio v0.2.22
│   │   │   │   ├── bytes v0.5.6
│   │   │   │   ├── fnv v1.0.7
│   │   │   │   ├── futures-core v0.3.5
│   │   │   │   ├── iovec v0.1.4
│   │   │   │   │   └── libc v0.2.76
│   │   │   │   ├── lazy_static v1.4.0
│   │   │   │   ├── libc v0.2.76
│   │   │   │   ├── memchr v2.3.3
│   │   │   │   ├── mio v0.6.22
│   │   │   │   │   ├── cfg-if v0.1.10
│   │   │   │   │   ├── iovec v0.1.4 (*)
│   │   │   │   │   ├── libc v0.2.76
│   │   │   │   │   ├── log v0.4.11 (*)
│   │   │   │   │   ├── net2 v0.2.34   <<<<<<<<<<<<<<
│   │   │   │   │   │   ├── cfg-if v0.1.10
│   │   │   │   │   │   └── libc v0.2.76
│   │   │   │   │   └── slab v0.4.2
│   │   │   │   ├── mio-uds v0.6.8

There is an issue to make tokio support WASM, so I guess that would need to be resolved first: tokio-rs/tokio#1597

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