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

sh cargo install witx-codegen

Usage

```text WITX code generator for WebAssembly guest modules

USAGE: witx-codegen [FLAGS] [OPTIONS] ...

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 Set the module name to use instead of reading it from the witx file -o, --output Output file, or - for the standard output -t, --output-type Output type. One in: {assemblyscript, rust, overview, markdown} [default: assemblyscript]

ARGS: ... WITX files ```

Backends