https://github.com/th4s/wasm-tokio
This is test repo for tokio in wasm
https://github.com/th4s/wasm-tokio
Last synced: about 1 year ago
JSON representation
This is test repo for tokio in wasm
- Host: GitHub
- URL: https://github.com/th4s/wasm-tokio
- Owner: th4s
- Created: 2023-03-08T14:10:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T17:05:20.000Z (over 3 years ago)
- Last Synced: 2025-02-12T02:08:36.605Z (over 1 year ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wasm-Tokio Example
This is a test project to run KOS OT `rand_setup` in the browser using WASM, making use of a
single-threaded tokio runtime and multiple rayon threads.
## How to run it
### Requirements
1. Install google-chrome browser.
2. Install [simple-http-server](https://github.com/TheWaWaR/simple-http-server)
3. Install [wasm-pack](https://rustwasm.github.io/wasm-pack/)
### Run
```
# Build wasm modules and js wrapper
wasm-pack build -t web -d www/pkg --release
# Serve files
simple-http-server --ip 127.0.0.1 --nocache -t1 -i --coop --coep www
```
Now open Chrome at `localhost:8000`. You should see some messages in the
console.