2 releases

0.1.1 Apr 30, 2021
0.1.0 Apr 30, 2021

#1464 in WebAssembly

MIT/Apache

46KB
1.5K SLoC

s1vm

A fast WebAssembly (wasm) interpreter written in 100% safe Rust.

This project started with the idea to port WASM3's VM design to safe Rust.

See Ideas.md for some crazy ideas that might be used.

Goals

  1. Only use safe Rust. Crate marked #![forbid(unsafe_code)]
  2. Support pause/resume. Either by using async/await or stack unwinding/rewinding.
  3. Resource limits (CPU/Memory). Limiting or throttling CPU usage is useful for running sandboxed code.

Benchmark

Benchmark of s1vm against other wasm interpreters:

  • WASM3 - C

  • wasmi - Rust

  • fib.wasm 35

    • wasm3 - 0.66 seconds
    • s1vm - 1.29 seconds
      • wasmi - 3.31 seconds
  • fib.wasm 41

    • wasm3 - 9.8 seconds
    • s1vm - 22.5 seconds
      • wasmi - 57.6 seconds

TODOs

  • - Support calling host functions.
  • src/compiler.rs - Implement missing compiler opcodes.

Dependencies

~400KB
~11K SLoC

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy