Thanks to visit codestin.com
Credit goes to github.com

Skip to content

oss-fun/chiwawa

Repository files navigation

chiwawa(CHeckpoint/restore and Instrumentation-specific WAsm runtime on WAsm runtime)

Chiwawa (Japanese-like Pronunciation of chihuahua) is a self-hosted Wasm runtime that enables live migration and instrumentation that is neutral to the execution methods (e.g., interpreter, JIT, and AOT) and architectures, and runtimes.

U^ェ^U

Build and Run

cargo build --target wasm32-wasip1 --release

# Call function with Wasm parameters (I32, I64, F32, F64)
somethingWasmRuntime target/wasm32-wasip1/release/chiwawa.wasm test.wasm --invoke func-name --params "I64(100)"

# Pass command-line arguments to WASI-compiled program
somethingWasmRuntime target/wasm32-wasip1/release/chiwawa.wasm test.wasm --app-args "--version"

Checkpoint and Restore

Note: The checkpoint trigger mechanism differs between build targets:

  • wasm32-wasip1-threads: Uses a background thread to monitor checkpoint.trigger file (recommended for better performance)
  • wasm32-wasip1: Checks file existence via WASI at each instruction (use if host runtime does not support WASI threads)
cargo build --target wasm32-wasip1-threads --release

# Run with checkpoint enabled
somethingWasmRuntime target/wasm32-wasip1-threads/release/chiwawa.wasm test.wasm --invoke func-name --params "I64(100)" --cr
touch ./checkpoint.trigger # Trigger of Checkpointing
# Restore from checkpoint
somethingWasmRuntime target/wasm32-wasip1-threads/release/chiwawa.wasm test.wasm --restore checkpoint.bin

Tracing

# TRACE_EVENTS = (all,store,load,call,branch)
# TRACE_RESOURCE = (stack,memory,locals,globals,pc)
somethingWasmRuntime target/wasm32-wasip1-threads/release/chiwawa.wasm test.wasm --trace  --trace-events [<TRACE_EVENTS>...] --trace-resource [<TRACE_RESOURCE>...]

Artifacts

Academic

  • Y. Nakata and K. Matsubara, Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum (Just Accepted)
    • The 3rd International Workshop on Middleware for the Computing Continuum (Mid4CC, 26th ACM/IFIP International Middleware Conference Co-located Workshop)
  • Y. Nakata and K. Matsubara, Feasibility of Runtime-Neutral Wasm Instrumentation for Edge-Cloud Workload Handover
    • The Ninth ACM/IEEE Symposium on Edge Computing (SEC)

Tech Community

References

I referred to these repositories for initial implementation. I appreciate ancestor's wisdom!

About

chiwawa(CHeckpoint/restore and Instrumentation-specific WAsm runtime on WAsm runtime)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published