Module wasmer_c_api::wasm_c_api[][src]

Implementation of the official WebAssembly C API for Wasmer.

We would like to remind the reader that this official standard can be characterized as a living standard. As such, the API is not yet stable, even though it shows maturity over time. The API is described by the wasm.h C header, which is included by wasmer_wasm.h C header file (which contains extension of the standard API, for example to provide WASI or vendor-specific features).

Quick Guide

Usually, the user first needs to create an engine and a store. Once it's done, the user needs to create a module and then instantiate it. When instantiating the module, the user is able to pass a set of imports. With an instance, the user is able to call the exports.

Every module comes with examples and entry points to guide the discovery of this API.

Modules

engine

An engine drives the compilation and the runtime.

externals

cbindgen:ignore

instance

A WebAssembly instance is a stateful, executable instance of a WebAssembly module.

macros

Private Rust macros.

module

A WebAssembly module contains stateless WebAssembly code that has already been compiled and can be instantiated multiple times.

store

A store represents all global state that can be manipulated by WebAssembly programs. It consists of the runtime representation of all instances of functions, tables, memories, and globals that have been allocated during the lifetime of the abstract machine.

trap

cbindgen:ignore

types

cbindgen:ignore

unstable

This module contains unstable non-standard C API.

value

Possible runtime values that a WebAssembly module can either consume or produce.

version

Wasmer-specific API to get or query the version of this Wasm C API.

wasi

Unofficial API for WASI integrating with the standard Wasm C API.

wat

Wasmer-specific API to transform the WAT format into Wasm bytes.