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

Traverse workspace members (each with their own binaries and examples) #21

Open
rnag opened this issue Mar 13, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@rnag
Copy link
Owner

rnag commented Mar 13, 2023

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

Additional context

@rnag rnag added the enhancement New feature or request label Mar 13, 2023
@rnag rnag changed the title support a use case of workspace members (each with their own binaries and examples) traverse workspace members (each with their own binaries and examples) Mar 13, 2023
@rnag rnag changed the title traverse workspace members (each with their own binaries and examples) Traverse workspace members (each with their own binaries and examples) Mar 13, 2023
@rnag rnag mentioned this issue Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant