Skip to content

Simple Rust applications that run in WasmEdge

Notifications You must be signed in to change notification settings

kokamkarsahil/rust-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust examples for WasmEdge

Simple Rust applications that run in WasmEdge. They also serve as a good learning resource for the Rust language.

Prerequisites

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

Note: Running cargo build in any package directory the output will get stored at parent directory of folder because of Cargo Workspace.

├── Cargo.lock
├── Cargo.toml
├── control
├── function
├── hello
├── move
├── README.md
├── server
├── string
├── struct
├── target # Your Build files
└── wasi

Standalone examples

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.

Library examples

This set of examples demonstrate Rust library functions that can be called from outside of the WasmEdge Runtime (i.e., in a host application).

More examples

For Rust apps that compile to Wasm and run inside WasmEdge.

For Rust apps that embed WasmEdge apps and provide host functions to WasmEdge.

About

Simple Rust applications that run in WasmEdge

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 67.8%
  • Dockerfile 32.2%