📄️ Wasmtime Introduction
Wasmtime is a fast and secure runtime for WebAssembly built by the Bytecode Alliance. Wasmbox uses the Wasmtime engine to compile and execute WASM. This is exposed through the wasmtime-dotnet library.
📄️ Engine
An Engine is used to compile WASM code into native machine code ready for execution. The Engine class is a wrapper around the wasmtime::Engine struct.
📄️ Function
A Function represents a callable piece of code. This may be a WASM function that can be called by C# code, or a C# function which can be called by WASM code. The Function class is a wrapper around the wasmtime::Func struct.
📄️ Global
A Global represents a single named value with a specific type. All globals are readable, some globals are also writable.
📄️ Instance
An Instance is an instantiation of a Module, which can be used to execute WASM code. The Instance class is a wrapper around the wasmtime::Instance struct.
📄️ Linker
A Linker provides a set of imports for instantiating a Module. The Linker class is a wrapper around the wasmtime::Linker struct.
📄️ Memory
A Memory represents a contiguous array of bytes that WASM code can read and write. The Memory class is a wrapper around the wasmtime::Memory struct.
📄️ Module
A Module represents WASM code that has been compiled by an Engine into executable machine code. The Module class is a wrapper around the wasmtime::Module struct. A Module declares a set of imports (things it requires) and exports (things it provides).
📄️ Store
A Store is the owner of all state in WASM. The Store class is a wrapper around the wasmtime::Store struct.
📄️ Table
A Table represents a list references which cannot be stored as bytes in Memory for safety and portability reasons.. The Table class is a wrapper around the wasmtime::Table struct.
📄️ ValueKind
A ValueKind represents all of the possible types of a WebAssembly value. This is used to represent the type of various constructs such as Globals, or Function parameters/results.