4 releases

new 0.0.6 Sep 6, 2024
0.0.5 Sep 1, 2024
0.0.1 Aug 28, 2024
0.0.0 May 23, 2024

#592 in Programming languages

Download history 98/week @ 2024-05-17 37/week @ 2024-05-24 1/week @ 2024-06-07 129/week @ 2024-08-23 185/week @ 2024-08-30

314 downloads per month
Used in 4 crates (via midenc-compile)

MIT license

1.5MB
34K SLoC

Wasm frontend

This crate provides a library for converting a Wasm module or component to Miden HIR.

Unsupported Wasm Spec v1 types and instructions

  • All floating point types and instructions;
  • V128 type and instructions;

Wasm module translation limitations

The following features are not yet supported due to not being found in Wasm binaries generated by the Rust compiler:

  • Imported global variables;
  • Passive data segments in data section spec;

There is no reason why these features cannot be supported, and they will be added in the future.

Wasm component translation limitations

Multiple core module instances are not yet supported

In terms of the Wasm component model(CM), a core module instance is a core module with fulfilled imports. The IR Module is a core module instance counterpart since the imports are provided as MAST root hashes at translation. It seems that in practice this isn't likely to come up for code compiled together as a unit, however it can happen when tools produce components from a set of core Wasm modules, or that modify an existing component to "link" multiple core Wasm modules together. As soon as we hit this limitation in the translated code, we will add support for it.

Component start section is not supported

The start section is a section that specifies a function to be invoked when the module is instantiated. It is not supported because it is not found in Wasm binaries generated by the Rust compiler. It will be added in the future.

Dependencies

~17–44MB
~704K SLoC