-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Is your feature request related to a problem? Please describe.
Let's use this project as an example:
https://github.com/sonos/tract
Support Binaries in src/bin
I try to run cargo run
at root level, I get following output:
$ cargo run
error: `cargo run` could not determine which binary to run. Use the `--bin` option to specify a binary, or the `default-run` manifest key.
available binaries: example-dump-nnef-mobilenet-v2, example-nnef-mobilenet-v2, example-onnx-mobilenet-v2, example-pytorch-resnet, example-tensorflow-mobilenet-v2, jupyter-keras-tract-tf1, jupyter-keras-tract-tf2, pytorch-albert-v2, reset-test-list, tract
Hmm - that's strange! Where did all those binaries come from? It's really interesting, because those are not ones defined at root level either. Looks like those are binaries/examples of workspace members actually.
Take this binary target: reset-test-list
It looks like that is actually coming from a workspace member, harness/onnx-test-suite
> src > bin > reset-test-list.rs
. So we need to support this use case first of all - binaries in src/bin
of a workspace member.
Support examples (in workspace members)
Now, when I run cargo run --example
:
$ cargo run --example
error: "--example" takes one argument.
Available examples:
plus3
Hmm - that's really interesting! There is no such example at root level, under example > plus3.rs
. What gives? It looks like this is actually an example from a workspace member, tensorflow
> examples > plus3.rs
. So we will also need to support such examples within workspace members as well.
Describe the solution you'd like
All runnable targets are included in output when rx
is entered in a terminal.
Describe alternatives you've considered
n/a