Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo run requires --bin #166

Closed
stevedonovan opened this issue May 10, 2017 · 6 comments
Closed

cargo run requires --bin #166

stevedonovan opened this issue May 10, 2017 · 6 comments

Comments

@stevedonovan
Copy link

I had to use --bin to specify which executable:

cargo run --bin miri tests/run-pass/vecs.rs

This is because there's also a cargo-miri exe

@oli-obk
Copy link
Contributor

oli-obk commented May 10, 2017

Would be trivial to fix by adding a sub-crate for cargo-miri. Opinions?

@RalfJung
Copy link
Member

It seems subcrates are not built per default, so the instructions have to change to cargo build --all. Also, they are not installed, and there is no cargo install --all, so one has to run cargo install --debug && cargo install --path cargo-miri --debug...

@RalfJung
Copy link
Member

RalfJung commented Jun 2, 2017

FWIW, I pushed "cargo-miri as a subcrate" to https://github.com/RalfJung/miri/tree/subcrate. However, due to the reasons stated above (in particular the installation part), I am doubtful whether that's really making things any better.

@oli-obk
Copy link
Contributor

oli-obk commented Jun 3, 2017

I wonder it it would make sense to add a default binary setting to cargo.toml since I've seen this issue show up in a few projects now...

@RalfJung
Copy link
Member

RalfJung commented Jun 3, 2017

You mean like this? rust-lang/cargo#2200

@RalfJung
Copy link
Member

This got fixed by using the experimental default-run feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants