witx-codegen 0.3.8

WITX code generator for WebAssembly guest modules.
witx-codegen-0.3.8 is not a library.
Visit the last successful build: witx-codegen-0.11.4

WITX code generator

CI status crates.io

WITX-CodeGen: A WITX code generator

WITX is a way to describe types and function interfaces from WebAssembly modules.

From this, code generators can generate code that accesses data and calls functions from different languages using the same layout and calling conventions.

WITX is the description language used by WASI. This tool uses the next (as on April 5th, 2021) revision of the format, as implemented in version 0.10 of the Rust witx crate.

WITX-CodeGen is written in Rust, but was designed to generate code for multiple languages that is simple to use, as well as multiple documentation formats.

This is a rewrite of as-witx.

Installation

  • Via cargo:
cargo install witx-codegen
  • Precompiled binaries: tarballs and Debian/Ubuntu packages are available here.

Usage

WITX code generator for WebAssembly guest modules

USAGE:
    witx-codegen [FLAGS] [OPTIONS] <witx_files>...

FLAGS:
    -h, --help            Prints help information
    -H, --skip-header     Do not generate a header
    -I, --skip-imports    Ignores imported types and functions
    -V, --version         Prints version information

OPTIONS:
    -m, --module-name <module_name>    Set the module name to use instead of reading it from the witx file
    -o, --output <output_file>         Output file, or - for the standard output
    -t, --output-type <output_type>    Output type. One in: {assemblyscript, overview, rust} [default: assemblyscript]

ARGS:
    <witx_files>...    WITX files

Backends

  • AssemblyScript
  • Zig
  • Rust
  • TinyGo
  • C/C++
  • API Overview
  • Documentation