second-state / ssvm-deno-starter

A template project to run Rust functions in Deno through the Second State WebAssembly engine.
https://www.secondstate.io/articles/ssvmup/
52 stars 12 forks source link

Error running `ssvmup build --target deno` on macOS and Linux #4

Open mr-beerkiss opened 3 years ago

mr-beerkiss commented 3 years ago

Hi,

I stumbled across your blog post about how to run WebAssembley and Deno. I've checked out the source locally, but when I run ssvmup build --target deno I get the following error:

[INFO]: ⬇️  Installing wasm-bindgen...
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `1`', crates/cli-support/src/js/binding.rs:215:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit code: 101
  full command: "/Users/darren/Library/Caches/.ssvmup/wasm-bindgen-17832de66412ed8c/wasm-bindgen" "--out-dir" "ssvm/ssvm-deno-starter/pkg" "--no-typescript" "--target" "deno" "ssvm/ssvm-deno-starter/target/wasm32-wasi/release/functions_lib.wasm"

I've tried running with RUST_BACKTRACE=1 and RUST_BACKTRACE=full but the output wasn't very illumniating, and I'm too much of a rust n00b to even know where to start tring to debug this.

I got the same error on macOS Big Sur and Xubuntu.

myisaak commented 3 years ago

Try running from the .devcontainer/Dockerfile docker file. If you have VSCode just open the project as a container and work from there, it's much simpler setup.