Skip to content

Latest commit

 

History

History
258 lines (173 loc) · 10.8 KB

INTEGRATION.md

File metadata and controls

258 lines (173 loc) · 10.8 KB

Integration

List of projects can be found below. This list is subject to changes in the future.

Regarding APIs, we will focus first on apis in charge of the following operations:

  • [YES] parsing/deserialization.
  • [YES] validation.
  • [YES] instantiation.
  • [YES] execution.
  • [MAYBE] serialization.

Projects integrated

Those projects are already supported/integrated.

wasmi (Rust)

Wasm interpreter in Rust: github / documentation

Details

  • APIs:

    • wasmi::Module::from_buffer: Load, validate and prepare a parity_wasm's Module. - impl
    • validate_module: A module validator function - impl
    • wasmi::ModuleInstance::new: Runtime representation of a wasmi::Module - example
  • Examples:

wasmtime (Rust)

Standalone JIT-style runtime for WebAssembly: github / guide

Details

  • backends:

  • APIs:

    • oracles::compile: Generic way to compile wasm module bytes - example
    • oracles::instantiate: Generic way to compile and instantiate wasm module bytes - example / other
    • lightbeam::translate: Translate wasm module bytes to TranslatedModule Struct impl
  • Examples:

wasmer (Rust)

Standalone WebAssembly runtime: github / documentation

Details

parity-wasm (Rust)

WebAssembly serialization/deserialization in rust: github / documentation

Details

  • APIs:

    • parity_wasm::deserialize_file: module parsing - test
    • parity_wasm::Module struct: WebAssembly module impl
    • parity_wasm::serialize_to_file: will not be supported for the moment.
  • Examples:

wasmparser (Rust)

A simple event-driven library for parsing WebAssembly binary files: github / documentation

Details

  • APIs:

    • wasmparser::Parser: Event-driven parser of WebAssembly binary - impl
    • wasmparser::ValidatingParser: validate module depending of provided config - impl
    • wasmparser::ValidatingParserConfig: validate module depending of provided config - impl
  • Examples:

binaryen (C++/Rust)

Compiler infrastructure and toolchain: github / rust bindings

Details

  • Rust APIs:

    • binaryen::Module::read: Deserialize a module from binary form. - impl
    • binaryen::Module::optimize: Run the standard optimization passes on the module. - impl
    • Binaryen interpreter: Simple WebAssembly interpreter - code
  • Rust examples:

wabt (C++/Rust)

The WebAssembly Binary Toolkit - github / rust bindings

Details

  • Rust Apis:

    • Module: WebAssembly module. (take a Features struct - possible to active enable_all(https://github.com/pepyakin/wabt-rs/blob/master/src/lib.rs#L182))
    • Module::read_binary / wasm2wat::convert: useful if we validate the module first since read_binary doesn't do any validation.
    • wasm2wat: Disassemble wasm binary to wasm text format. - doc
    • wasm2wat_with_features: Disassemble wasm binary to wasm text format with the given features. - doc
    • Module::validate: Validate the module. - impl
    • wat2wasm: Translate wasm text source to wasm binary format. - NOT A PRIORITY TO IMPLEMENT - doc
    • wat2wasm_with_features: Translate wasm text source to wasm binary format with the given features. - NOT A PRIORITY TO IMPLEMENT - doc
  • Rust examples:

wasm-tools/wasmprinter (Rust)

A Rust parser for printing a WebAssembly binary in the WebAssembly Text Format (WAT). - github

Details

  • Rust Apis:
    • print_bytes: Prints an in-memory wasm binary blob into an in-memory String which is its textual representation. - doc

wasm-tools/wat (Rust)

A Rust parser for the WebAssembly Text Format (WAT). - github

Details

  • Rust Apis:
    • wat::parse_str: doc

wasm-tools/wast (Rust)

A Rust parser for the WebAssembly Text Format (WAST). - github

Details

  • Rust Apis:
    • ParseBuffer::new
    • parser::parse::<Wat>

wain (Rust)

WebAssembly implementation from scratch in Safe Rust with zero dependencies - github

Details

  • Rust Apis:
    • wain_syntax_binary::parse: github
    • wain_validate::validate: github

wasm3 (C++/Rust)

Details

  • Rust Apis:
    • Module::parse

fizzy (C++/Rust)

  • fizzy - fast, deterministic, and pedantic WebAssembly interpreter written in C++. - rust bindings
Details

  • Rust Apis:
    • fizzy::validate - doc

Projects potentially integrated.

Those projects will be potentially supported/integrated in the future.

  • WAVM - WebAssembly Virtual Machine in C++.
  • webassemblyjs - Toolchain for WebAssembly in JavaScript.
  • wagon - WebAssembly-based Go interpreter, for Go.