hermit-os / hermit-rs

Hermit for Rust.
Apache License 2.0
1.69k stars 86 forks source link

add wasmtime demo #593

Closed stlankes closed 4 months ago

stlankes commented 4 months ago

Wasmtime is a fast and secure runtime for WebAssembly. The demo compiles and run the function fibonacci. The source code of the fibonacci function is publish in the directory examples/fibbonacci.

The deep fibonacci is compiled as followed:

cargo build -Zbuild-std=std,panic_abort --target wasm32-unknown-unknown -p fibonacci --release

This PR depends on hermit-os/kernel#1294 The functions setjmp / longjmp are derived from the MUSL library, which is ditributed by the MIT license.