-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I tried this
~/gh/proxy-wasm/proxy-wasm-rust-sdk$ bazel build //examples:hello_world
the output looks like this
WARNING: Download from https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz failed: class javax.net.ssl.SSLHandshakeException PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO: Analyzed target //examples:hello_world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //examples:hello_world up-to-date:
bazel-bin/examples/hello_world.wasm
Then in the test-framework project I did this
cargo run --example hello_world
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target/debug/examples/hello_world`
error: The following required arguments were not provided:
<wasm-path>
USAGE:
hello_world [FLAGS] <wasm-path>
For more information try --help
following that I tried this
cargo run --example hello_world ~/gh/proxy-wasm/proxy-wasm-rust-sdk/bazel-bin/examples/hello_world.wasm
The output looks like this
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/examples/hello_world /home/janitha/gh/proxy-wasm/proxy-wasm-rust-sdk/bazel-bin/examples/hello_world.wasm`
thread 'main' panicked at 'Error: test-framework does not support proxy-wasm modules of this abi version', src/hostcalls.rs:47:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Why is this saying the abi version is unsupported?
The backtrace implies that I am calling improperly i.e. the wasm is not loaded
RUST_BACKTRACE=1 cargo run --example hello_world /home/janitha/gh/proxy-wasm/proxy-wasm-rust-sdk/bazel-bin/examples/hello_world.wasm
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/examples/hello_world /home/janitha/gh/proxy-wasm/proxy-wasm-rust-sdk/bazel-bin/examples/hello_world.wasm`
thread 'main' panicked at 'Error: test-framework does not support proxy-wasm modules of this abi version', src/hostcalls.rs:47:9
stack backtrace:
0: std::panicking::begin_panic
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:541:12
1: proxy_wasm_test_framework::hostcalls::get_abi_version
at ./src/hostcalls.rs:47:9
2: proxy_wasm_test_framework::tester::mock
at ./src/tester.rs:47:23
3: hello_world::main
at ./examples/hello_world.rs:24:32
4: core::ops::function::FnOnce::call_once
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:227:5
What is the correct way to call it?
Metadata
Metadata
Assignees
Labels
No labels