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

Move cli code to a hugr-cli subcrate #1099

Closed
aborgna-q opened this issue May 22, 2024 · 2 comments
Closed

Move cli code to a hugr-cli subcrate #1099

aborgna-q opened this issue May 22, 2024 · 2 comments
Assignees

Comments

@aborgna-q
Copy link
Collaborator

Followup from my comment on the cli PR #1096 (comment).

The PR defines a new hugr cli interface with utilities. This is available directly on the hugr package, so it can be installed with cargo install hugr.
This requires the bin target to be defined directly in the main crate.

Currently the accessory code for the binary that handles arguments and tests is exposed directly under a cli feature in the hugr lib. We expect some internal projects to depend on this feature, but in general it's not a useful feature for users of the library.

We clean up this by following the structure of ripgrep:

  • Define a hugr-cli subcrate with the library code and tests. Users can depend directly on this.
  • Rename the hugr feature to _cli so it doesn't appear on docs.rs, and make it require hugr-cli.

This would help with modularising the code and reducing compile times.

@ss2165
Copy link
Member

ss2165 commented May 22, 2024

This builds nicely on to the crate split up work started by #1000

@ss2165 ss2165 self-assigned this May 24, 2024
@aborgna-q
Copy link
Collaborator Author

Implemented in #1107

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

2 participants