docs.rs failed to build wabt-0.9.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
wabt-0.10.0
WABT bindings for Rust
Rust bindings for WABT. Work in progress.
Usage
Add this to your Cargo.toml
:
[]
= "0.7.1"
Example
wat2wasm
(previously known as wast2wasm
):
extern crate wabt;
use wat2wasm;
wasm2wat
:
extern crate wabt;
use wasm2wat;
wabt
can be also used for parsing the official testsuite scripts.
use ;
let wast = r#"
;; Define anonymous module with function export named `sub`.
(module
(func (export "sub") (param $x i32) (param $y i32) (result i32)
;; return x - y;
(i32.sub
(get_local $x) (get_local $y)
)
)
)
;; Assert that invoking export `sub` with parameters (8, 3)
;; should return 5.
(assert_return
(invoke "sub"
(i32.const 8) (i32.const 3)
)
(i32.const 5)
)
"#;
let mut parser = from_str?;
while let Some = parser.next?