โฏ strace -e trace=open -- wasm-pack init
open("/proc/sys/vm/overcommit_memory", O_RDONLY) = 3
open("/sys/kernel/mm/transparent_hugepage/enabled", O_RDONLY) = 3
open(".", O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = -1 EISDIR (Is a directory)
Is a directory (os error 21)
Caused by: Is a directory (os error 21)
+++ exited with 1 +++
I'm getting this error (with the release musl 0.3.0 or building it locally), on Debian.
cargo test passes all the tests locally.
How are you trying to use this? wasm-pack init already expects you to have a rust project. What's likely happening is that it's checking the current directory for the Cargo.toml but can't find it. So if you haven't already you'll need to create a new project using cargo.
@mgattozzi thank you for your reply. It has a simple Cargo.toml with lib and dependencies as described in the readme file.
Would this be enough to get it working?
cargo new wat --lib ; cd wat
wasm-pack init
@jbolila hrm, that is what should work- would you mind giving us the output of ls wat?
welp! can confirm that this is true. i think this may be a bug and i'll be working on a fix now!
workaround - run wasm-pack init . (can confirm this works, but this should not have to be what happened)
it works :) thank you! ... after adding code to src/lib.rs enough to produce the target/wasm32-unknown-unknown/release/??.wasm file.
Most helpful comment
workaround - run
wasm-pack init .(can confirm this works, but this should not have to be what happened)