WASM vs WASI what are the differences? Web Assembly System Interface

Опубликовано: 07 Ноябрь 2024
на канале: Stephen Blum
272
12

WASM and WASI are both connected to WebAssembly. WASM stands for WebAssembly, which is a secure, performant way to run code like Rust and C in web browsers at near-native speeds. WebAssembly is a binary format and a virtual machine usually run in browsers, but it can run in other environments too, like Node.js.

By default, WASM has no input-output capabilities. You can't make HTTP calls, write to disk, or log anything directly within it; it's locked down for security. On the other hand, WASI stands for WebAssembly System Interface.

It's an extension of WebAssembly that allows I/O. operations like reading and writing to files, making network requests, and accessing system clocks and random numbers. This makes WASI suitable for running WebAssembly code outside of browsers, such as in server applications.