Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haraldh/wasi_tokio_httpd
https://github.com/haraldh/wasi_tokio_httpd
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/haraldh/wasi_tokio_httpd
- Owner: haraldh
- License: mit
- Created: 2022-06-10T12:46:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T07:19:30.000Z (over 2 years ago)
- Last Synced: 2024-10-15T23:24:17.141Z (3 months ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wasi_tokio_http
This is a modified version of the
[`tinyhttp.rs`](https://github.com/tokio-rs/tokio/blob/5288e1e144d33ace0070325b16029523b1db0ffe/examples/tinyhttp.rs)
example in the tokio repository.## Prerequisites
Be sure to update your rust stable toolchain to at least 1.60.0.
## Running
### wasmtime
```console
❯ CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime run --tcplisten 127.0.0.1:8080" cargo run --target wasm32-wasi
```Server is running on [`http://127.0.0.1:8080`](http://127.0.0.1:8080).
### enarx
after installing [enarx](https://github.com/enarx/enarx/) in `$PATH` with `cargo install`
```console
❯ CARGO_TARGET_WASM32_WASI_RUNNER="enarx run --wasmcfgfile Enarx.toml" cargo run --target wasm32-wasi
```Server is running on [`https://127.0.0.1:3000`](https://127.0.0.1:3000).