Module translator

Source
Expand description

This module defines the parser and translator from wasmparser to a common structure ModuleInfo.

It’s derived from cranelift-wasm but architected for multiple compilers rather than just Cranelift.

Re-exportsΒ§

pub use self::environ::FunctionBinaryReader;
pub use self::environ::FunctionBodyData;
pub use self::environ::ModuleEnvironment;
pub use self::middleware::FunctionMiddleware;
pub use self::middleware::MiddlewareBinaryReader;
pub use self::middleware::MiddlewareReaderState;
pub use self::middleware::ModuleMiddleware;
pub use self::middleware::ModuleMiddlewareChain;
pub use self::module::translate_module;
pub use self::sections::wpheaptype_to_type;
pub use self::sections::wptype_to_type;
pub use self::state::ModuleTranslationState;
pub use error::from_binaryreadererror_wasmerror;

ModulesΒ§

environ πŸ”’
error πŸ”’
middleware πŸ”’
The middleware parses the function binary bytecodes and transform them with the chosen functions.
module πŸ”’
Translation skeleton that traverses the whole WebAssembly module and call helper functions to deal with each part of it.
sections πŸ”’
Helper functions to gather information for each of the non-function sections of a WebAssembly module.
state πŸ”’