Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdeleuze/wasi-server
https://github.com/sdeleuze/wasi-server
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sdeleuze/wasi-server
- Owner: sdeleuze
- License: mit
- Created: 2022-03-18T14:53:54.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T15:29:26.000Z (almost 3 years ago)
- Last Synced: 2025-01-05T21:16:47.280Z (19 days ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# WASI Server Examples
## TCP echo server
To build the project:
`cargo build --target wasm32-wasi`Then:
`wasmtime run --tcplisten 127.0.0.1:9000 --env 'LISTEN_FDS=1' target/wasm32-wasi/debug/wasi-server-tcp.wasm`Then on another terminal:
`nc 127.0.0.1 9000`## HTTP server
To build the project:
`cargo build --target wasm32-wasi`Then:
`wasmtime run --tcplisten 127.0.0.1:9000 --env 'LISTEN_FDS=1' target/wasm32-wasi/debug/wasi-server-http.wasm`Then on another terminal:
`curl http://127.0.0.1:9000`