cargo-web
cargo-web copied to clipboard
Adding [[bin]] makes web builds fail
I'm not sure how to handle this exactly, but if I add a section like so:
[[bin]]
name = "parinfer-rust"
path = "src/main.rs"
To my Cargo.toml, then cargo +nightly web test --nodejs fails like so:
thread 'main' panicked at 'cannot calculate sha1sum of the `.wasm` file: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:983:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: cargo_web::wasm::process_wasm_file
10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &'a mut F>::call_mut
11: cargo_web::cargo_shim::BuildConfig::build_internal
12: cargo_web::cargo_shim::BuildConfig::build
13: cargo_web::build::Project::build
14: cargo_web::cmd_test::command_test
15: cargo_web::main
16: std::rt::lang_start::{{closure}}
17: std::panicking::try::do_call
18: __rust_maybe_catch_panic
19: std::rt::lang_start_internal
20: main
Maybe it's not useful to make .wasms for bins? Maybe there should be a way to disable some... targets (that's an overloaded word, and not the right one here)?