https://github.com/openstatushq/axum-wasmer
https://github.com/openstatushq/axum-wasmer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/openstatushq/axum-wasmer
- Owner: openstatusHQ
- License: mit
- Created: 2024-03-19T09:35:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-19T10:34:57.000Z (about 1 year ago)
- Last Synced: 2025-03-02T02:52:19.089Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is an [Axum](https://github.com/tokio-rs/axum) Web Server starter template that compiles to [WASIX](https://wasix.org).
> Checkout the full tutorial [here](http://wasix.org/docs/language-guide/rust/tutorials/wasix-axum)
## Getting started
First, build the project using [`cargo-wasix`](https://crates.io/crates/cargo-wasix):
```bash
$ cargo wasix build
```Then, you can run the server easily using Wasmer:
```bash
$ wasmer run . --net --env PORT=8080
Listening on http://127.0.0.1:8080
```> [!NOTE]
> You will need to have Wasmer installed (check out [the docs to install the Wasmer CLI](https://docs.wasmer.io/install)!).
> The `--net` flag is required to enable networking support in Wasmer. The `PORT` environment variable is required to run the server locally.## Deploy on Wasmer Edge
The easiest way to deploy your WCGI Rust app is to use the [Wasmer Edge](https://wasmer.io/products/edge).
Live example: https://wasix-axum-example.wasmer.app
```bash
wasmer deploy
```> [!NOTE]
> You will need to change the namespace in `wasmer.toml` to your own namespace and app name in `app.yaml` to your own app name.