Simple Rust applications that run in WasmEdge. They also serve as a good learning resource for the Rust language.
You can just install Docker Desktop.
Or, you could install Rust and WasmEdge as follows.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup target add wasm32-wasi
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -p /usr/local
├── Cargo.lock
├── Cargo.toml
├── control
├── function
├── hello
├── move
├── README.md
├── server
├── string
├── struct
└── wasi
This set of examples demonstrate Rust apps that each has a main()
function and can be started and executed a standalone app.
The standalone applications are dockerized so that you can get started easily.
- Hello world
- Working with strings
- Ownership and move
- Control flows
- Data types and structures
- Functions and return values
- Use OS system libraries
- Create an HTTP server
For Rust apps that compile to Wasm and run inside WasmEdge.
- High-performance HTTP services using the hyper_wasi crate
- HTTP clients using the reqwest_wasi crate
- HTTPS clients using the http_req_wasi crate
- Database applications
- An HTTP microservice with a MySQL backend
- A Kafka service with a MySQL backend
- ETL functions for databases
- Complex microservices with Dapr
- Tensorflow, Pytorch and OpenVINO apps
For Rust apps that embed WasmEdge apps and provide host functions to WasmEdge.