This repository was archived by the owner on Feb 3, 2023. It is now read-only.
Description Steps to reproduce:
hc init my-dna
cd my-dna
hc generate zomes/kebab-case
hc package
Output:
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR "
/home/paul/target
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR"
Updating crates.io index
Compiling kebab-case v0.1.0 (/home/paul/Holochain/kebab-test/zomes/kebab-case/code)
Finished release [optimized] target(s) in 2.79s
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && wasm-gc $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/kebab-case.wasm
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && wasm-gc $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/kebab-case.wasm"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:999:5
stack backtrace:
0: std::panicking::default_hook::{{closure}}
1: std::panicking::rust_panic_with_hook
2: std::panicking::continue_panic_fmt
3: rust_begin_unwind
4: core::panicking::panic_fmt
5: core::result::unwrap_failed
6: wasm_gc::main
7: std::rt::lang_start::{{closure}}
Error: Couldn't traverse DNA in directory "/home/paul/Holochain/kebab-test": command CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && wasm-gc $CARGO_TARGET_DIR/wasm32-unknown-unknown/release/kebab-case.wasm was not successful
As you can see, it compiles fine, but then when wasm-gc looks for the artifact kebab-case.wasm it can't find it. Looking in the target dir, it exists as kebab_case.wasm. Seems that cargo and rustc default to snake_casing the build artifact's filename, and there's no way for cargo to pass an explicit filename to rustc yet .
Reactions are currently unavailable
Steps to reproduce:
hc init my-dnacd my-dnahc generate zomes/kebab-casehc packageOutput:
As you can see, it compiles fine, but then when
wasm-gclooks for the artifactkebab-case.wasmit can't find it. Looking in the target dir, it exists askebab_case.wasm. Seems that cargo and rustc default to snake_casing the build artifact's filename, and there's no way for cargo to pass an explicit filename to rustc yet.