Add cli argument for using cargo-run-wasm within the same crate
I wanted to use cargo-run-wasm in a crate that wasn't part of a workspace. I can add the details to the readme, but I wanted to check if you are open to merging this before I do that.
The procedure is quite simple. You add an example called run-wasm.rs to the crate with the same main() as usual, but no Cargo.toml or directories. Then you add cargo-run-wasm to your dev-dependencies. The alias in the cargo config changes to run-wasm = "run --release --example run-wasm -- --same-crate" and that's it.
Have you considered doing a single combined workspace and crate Cargo.toml like winit does? https://github.com/rust-windowing/winit/blob/master/Cargo.toml
I'm not ruling out this functionality yet but just want to better understand your use case.
I think that only supporting workspaces would help keep the complexity of cargo-run-wasm down. Its not the implementation complexity that im worried about but more the complexity of the documentation (readme.md)
Thanks, that works for me. I didn't know you could mix crates and workspaces like that. I'm probably not the only one who would benefit from an explicit mention of this in the readme.
Feel free to close. I'm not sure this is a useful feature anymore.
I added the suggested change to readme.