flyflypeng opened issue #3338:
Description
I want to run a simple AOT style cwasm module which is compiled by the
wasmtime compile
command. So I use the examples in the documentation: Creating hello-world.wasmI compile the
hello-world
rust project to wasm32-wasi target and run it with wasmtime successfully:root@node1: /home/xxx/wasm-by-example/hello-world# cargo build --target wasm32-wasi Compiling hello-world v0.1.0 (/home/xxx/wasm-by-example/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.56s root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime run target/wasm32-wasi/debug/hello-world.wasm Hello, world!
However, I failed to run the
hello-world
AOT format wasm module compiled bywasmtime compile
command, the output is:root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime compile target/wasm32-wasi/debug/hello-world.wasm root@node1:/home/xxx/wasm-by-example/hello-world# ls Cargo.lock Cargo.toml hello-world.cwasm src target root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime run hello-world.cwasm Error: failed to run main module `hello-world.cwasm` Caused by: failed to parse `hello-world.cwasm`: input bytes aren't valid utf-8
Environment Info
wasmtime version:
root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime --version wasmtime 0.29.0
OS Info:
root@node1:/home/xxx/wasm-by-example/hello-world# cat /etc/os-release NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.1 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic root@node1:/home/xxx/wasm-by-example/hello-world# uname -r 4.15.0-154-generic
alexcrichton closed issue #3338:
Description
I want to run a simple AOT style cwasm module which is compiled by the
wasmtime compile
command. So I use the examples in the documentation: Creating hello-world.wasmI compile the
hello-world
rust project to wasm32-wasi target and run it with wasmtime successfully:root@node1: /home/xxx/wasm-by-example/hello-world# cargo build --target wasm32-wasi Compiling hello-world v0.1.0 (/home/xxx/wasm-by-example/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.56s root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime run target/wasm32-wasi/debug/hello-world.wasm Hello, world!
However, I failed to run the
hello-world
AOT format wasm module compiled bywasmtime compile
command, the output is:root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime compile target/wasm32-wasi/debug/hello-world.wasm root@node1:/home/xxx/wasm-by-example/hello-world# ls Cargo.lock Cargo.toml hello-world.cwasm src target root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime run hello-world.cwasm Error: failed to run main module `hello-world.cwasm` Caused by: failed to parse `hello-world.cwasm`: input bytes aren't valid utf-8
Environment Info
wasmtime version:
root@node1:/home/xxx/wasm-by-example/hello-world# wasmtime --version wasmtime 0.29.0
OS Info:
root@node1:/home/xxx/wasm-by-example/hello-world# cat /etc/os-release NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.1 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic root@node1:/home/xxx/wasm-by-example/hello-world# uname -r 4.15.0-154-generic
Last updated: Nov 22 2024 at 16:03 UTC