Crate unc_vm_vm

source ·
Expand description

Runtime library support for Wasmer.

Re-exports§

  • pub use crate::tunables::TestTunables;

Modules§

  • Runtime library calls.
  • WebAssembly trap handling, which is built on top of the lower-level signalhandling mechanisms.

Structs§

  • A function export value with an extra function pointer to initialize host environments.
  • Extra metadata about ExportFunctions.
  • The registry that holds the values that VMFuncRefs point to.
  • A pointer to the beginning of the function body.
  • Represents a continuous region of executable memory starting with a function entry point.
  • A Global instance
  • Resolved import pointers.
  • This is an intermediate type that manages the raw allocation and metadata when creating an [Instance].
  • A handle holding an InstanceRef, which holds an Instance of a WebAssembly module.
  • A linear memory instance.
  • A table instance.
  • A simple struct consisting of a page-aligned pointer to page-aligned and initially-zeroed memory and a length.
  • A translated WebAssembly module, excluding the function bodies and memory initializers.
  • A Resolver that links two resolvers together in a chain.
  • Resolver implementation that always resolves to None. Equivalent to ().
  • Pointers to section data.
  • WebAssembly requires that the caller and callee signatures in an indirect call must match. To implement this efficiently, keep a registry of all signatures, shared by all instances, so that call sites can just do an index comparison.
  • Target specific type for shared signature index.
  • Opaque state used to help control TLS state across stack switches for async support.
  • An index type for builtin functions.
  • The VM caller-checked “anyfunc” record, for caller-side signature checking. It consists of the actual function pointer and a signature id to be checked by the caller.
  • The VM “context”, which is pointed to by the vmctx arg in the compiler. This has information about globals, memories, tables, and other runtime state associated with the current instance.
  • The VMDynamicFunctionContext is the context that dynamic functions will receive when called (rather than vmctx). A dynamic function is a function for which we don’t know the signature until runtime.
  • This type does not do reference counting automatically, reference counting can be done with Self::ref_clone and Self::ref_drop.
  • A function reference. A single word that points to metadata about a function.
  • A function export value.
  • A placeholder byte-sized type which is just used to provide some amount of type safety when dealing with pointers to JIT-compiled function bodies. Note that it’s deliberately not Copy, as we shouldn’t be carelessly copying function body bytes around.
  • An imported function.
  • A global export value.
  • The storage for a WebAssembly global defined within the instance.
  • The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance.
  • A module import.
  • A locally defined function.
  • A memory export value.
  • The fields compiled code needs to access to utilize a WebAssembly linear memory defined within the instance, namely the start address and the size in bytes.
  • The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance.
  • This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.
  • An index into the shared signature registry, usable for checking signatures at indirect calls.
  • A table export value.
  • The fields compiled code needs to access to utilize a WebAssembly table defined within the instance.
  • The fields compiled code needs to access to utilize a WebAssembly table imported from another instance.

Enums§

  • The value of an export passed from one instance to another.
  • Error type describing things that can go wrong when operating on Wasm Globals.
  • A collection of data about host envs used by imported functions.
  • Error type describing things that can go wrong when operating on Wasm Memories.
  • Implementation styles for WebAssembly linear memory.
  • A reference stored in a table. Can be either an externref or a funcref.
  • Implementation styles for WebAssembly tables.
  • Stores trace message with backtrace.
  • A trap code describing the reason for a trap.
  • The value of an export passed from one instance to another.
  • A function kind is a calling convention into and out of wasm code.
  • Type of the import.
  • An InstanceRef that may or may not be keeping the Instance alive.

Constants§

  • Version number of this crate.

Statics§

  • The probestack based on the Rust probestack

Traits§

  • A predecesor of a full module Instance.
  • A trait for chaining resolvers together.
  • Artifacts that can be instantiated.
  • Trait for implementing Wasm Memory used by Wasmer.
  • Import resolver connects imports with available exported values.
  • Import resolver connects imports with available exported values.
  • Trait for implementing the interface of a Wasm table.
  • An engine delegates the creation of memories, tables, and globals to a foreign implementor of this trait.

Functions§

  • Catches any wasm traps that happen within the execution of closure, returning them as a Result.
  • Catches any wasm traps that happen within the execution of closure, returning them as a Result, with the closure contents.
  • Initializes the host environments.
  • Raises a trap from inside library code immediately.
  • Raises a user-defined trap immediately.
  • Carries a Rust panic across wasm code and resumes the panic on the other side.
  • Call the VM function pointed to by callee.

Type Aliases§

Unions§