wabt-rs
wabt-rs copied to clipboard
WABT bindings for Rust
Build failed: build failed on mac M1 chip Build Env: cargo 1.58.0-nightly (2e2a16e98 2021-11-08) rustc 1.58.0-nightly (936238a92 2021-11-11) Error msg Compiling quote v1.0.10 Compiling wabt-sys v0.8.0 (/Users/jacksoom/programer/rust/tools/wabt-rs/wabt-sys) Compiling serde_json v1.0.72...
This test program: ```rust use wabt::script::ScriptParser; fn main() { let filename = "dir/test.wast"; let buffer = b"(module)"; let mut parser = ScriptParser::::from_source_and_name(buffer, filename).unwrap(); while parser.next().expect("parser").is_some() {} } ``` prints this:...
Hey there! Is there an option to allow using this crate in a project aimed at the "wasm32-wasi" target? As far as I can see, allowing this might require some...
Would you take a PR that adds bindings to the wat-desugar tool? https://webassembly.github.io/wabt/doc/wat-desugar.1.html I've never written bindings to a C library, but I'd give it a try and ask for...
I unexpectedly saw `AssertUninstantiable` while parsing wast files that do not contain `assert_uninstantiable`. Expected: ``` $ cargo run in AssertTrap ``` Actual: ``` $ cargo run in AssertUninstantiable ``` Example:...
This would be useful for some use cases since benchmarks show that wabt's speed currently is much better than any other interpreter.
Hi. I noticed a problem when compiling on windows (10) with stable-x86_64-pc-windows-msvc. Cmake works on wabt, but rustc fails during rustc --crate-name wabt_sys ..... It cannot link to wabt.lib since...
At the moment, it allows reading scripts only from buffers. However, it might be convenient to read a script from the specified path.
See https://github.com/pepyakin/wabt-rs/pull/16#issuecomment-397748952 Basically this means that there is a possibility of calling `release()` twice. On the second call `release()` will return `nullptr` and this is most likely a bad thing.
By default [wasm2wat](https://github.com/pepyakin/wabt-rs/blob/e99e3c0e62d5ea83a650493cf41eb802eea78d3b/src/lib.rs#L855) only checks whether input module is malformed (i.e. incorrect size of a section, unexpected magic number or reserved byte isn't equal to 0), but doesn't validate a...