chmp / cargo-wop

Run cargo on Rust source files without setting up a project
MIT License
1 stars 1 forks source link

Allow to customize the default action #11

Closed chmp closed 3 years ago

chmp commented 3 years ago

Per default cargo wop script.rs runs the script. For libraries building them would be the more reasonable choice. Maybe add a custom key to the manifest:

[cargo-wop]
default-action = ["build", "--target", "wasm32-unknown-unknown"]

This would make the current default action equivalent to

[cargo-wop]
default-action = ["run", "--release"]

This should only apply to certain commands and trigger the normal cargo-wop rules (like filtering or copying build artifacts).

chmp commented 3 years ago

Implemented