Wasm Runtime of IC

I am learning about Wasm and have a question.

  • Is IC’s WebAssembly runtime WASI or IC’s own original one?
  • If IC uses WASI, which does it use Wasmer or Wasmi?
  • What does the target wasm32-unknown-unknown mean, and why are there so many different wasm targets?


IC doesn’t use WASI, as canisters don’t have access to filesystems. Instead, they call the IC’s System API.

The wasm runtime running on nodes is wasmtime.


wasm32-unknown-unknown means ‘headless’ WASM - i.e. it does not know about any external APIs, and is thus limited to libcore and liballoc functionality. The only reason Rust exposes libstd in this context is because the synchronization primitives can all be used as zero-cost wrappers, since wasm has no threads. There are multiple wasm32 targets for the same reason there are multiple x86_64 targets - multiple environments for libc backing for libstd (e.g. wasi), and multiple applicable linkers (e.g. emscripten). Target triples, in general, go arch-dist-os-abi.

1 Like