Expand description
§Overview
The wasmedge-sys crate defines a group of low-level Rust APIs for WasmEdge, a light-weight, high-performance, and extensible WebAssembly runtime for cloud-native, edge, and decentralized applications.
For developers, it is strongly recommended that the APIs in wasmedge-sys
are used to construct high-level libraries, while wasmedge-sdk
is for building up business applications.
- Notice that wasmedge-sys requires Rust v1.71 or above in the stable channel.
§Build
To use or build the wasmedge-sys
crate, the WasmEdge
library is required. Please refer to WasmEdge Installation and Uninstallation to install the WasmEdge
library.
-
The following table provides the versioning information about each crate of WasmEdge Rust bindings.
wasmedge-sdk WasmEdge lib wasmedge-sys wasmedge-types wasmedge-macro async-wasi 0.14.0+ 0.14.1 0.19.3 0.6.0 0.6.1 0.2.1 0.14.0+ 0.14.0 0.19.2 0.6.0 0.6.1 0.2.1 0.13.2 0.13.5 0.17.5 0.4.4 0.6.1 0.1.0 0.13.1 0.13.5 0.17.4 0.4.4 0.6.1 0.1.0 0.13.0 0.13.5 0.17.3 0.4.4 0.6.1 0.1.0 0.12.2 0.13.4 0.17.2 0.4.4 0.6.1 0.1.0 0.12.1 0.13.4 0.17.1 0.4.4 0.6.1 0.1.0 0.12.0 0.13.4 0.17.0 0.4.4 0.6.1 0.1.0 0.11.2 0.13.3 0.16.2 0.4.3 0.6.1 0.1.0 0.11.0 0.13.3 0.16.0 0.4.3 0.6.0 0.0.3 0.10.1 0.13.3 0.15.1 0.4.2 0.5.0 0.0.2 0.10.0 0.13.2 0.15.0 0.4.2 0.5.0 0.0.2 0.9.0 0.13.1 0.14.0 0.4.2 0.4.0 0.0.1 0.9.0 0.13.0 0.14.0 0.4.2 0.4.0 0.0.1 0.8.1 0.12.1 0.13.1 0.4.1 0.3.0 - 0.8.0 0.12.0 0.13.0 0.4.1 0.3.0 - 0.7.1 0.11.2 0.12.2 0.3.1 0.3.0 - 0.7.0 0.11.2 0.12 0.3.1 0.3.0 - 0.6.0 0.11.2 0.11 0.3.0 0.2.0 - 0.5.0 0.11.1 0.10 0.3.0 0.1.0 - 0.4.0 0.11.0 0.9 0.2.1 - - 0.3.0 0.10.1 0.8 0.2 - - 0.1.0 0.10.0 0.7 0.1 - -
§API Reference
§See also
Modules§
- async
async
and LinuxDefinesasync
related types. - Foreign function interfaces generated from WasmEdge C-API.
- Defines WasmEdge CallingFrame.
- Defines WasmEdge instance structs, including Function, Global, Memory, Table, and etc.
- Defines PluginManager and Plugin structs.
- Defines the WebAssembly primitive types.
- Defines the versioning and logging functions.
Structs§
- Represents a calling frame on top of stack.
- Compiler
aot
Defines WasmEdge ahead-of-time(AOT) compiler and the relevant APIs. - Defines Config struct used to check/set the configuration options.
- Defines an execution environment for both pure WASM and compiled WASM.
- Defines the types of the exported wasm values.
- Struct of WasmEdge FuncType.
- Defines a host function.
- Defines a WebAssembly global variable, which stores a single value of the given type and a flag indicating whether it is mutable or not.
- Struct of WasmEdge GlobalType.
- An ImportModule represents a host module with a name. A host module consists of one or more host function, table, memory, and global instances, which are defined outside wasm modules and fed into wasm modules as imports.
- Defines the types of the imported wasm value.
- Loader is used to load WASM modules from the given WASM files or buffers.
- Defines a WebAssembly memory instance, which is a linear memory described by its type. Each memory instance consists of a vector of bytes and an optional maximum size, and its size is a multiple of the WebAssembly page size (64KiB of each page).
- Struct of WasmEdge MemoryType.
- Defines compiled in-memory representation of an input WASM binary.
- Struct of WasmEdge Statistics.
- The Store is a collection of registered modules and assists wasm modules in finding the import modules they need.
- Struct of WasmEdge TableType.
- Struct of WasmEdge Validator.
- A WasiModule is a module instance for the WASI specification.
- Defines a WebAssembly value.
Traits§
- The object as an module instance is required to implement this trait.
Type Aliases§
- Defines a reference to a host function.
- WasiCtx
async
and LinuxType of wasi context that is used to configure the wasi environment.