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

Split CLI and library into two crates? #49

Closed
anderejd opened this issue Feb 2, 2019 · 4 comments
Closed

Split CLI and library into two crates? #49

anderejd opened this issue Feb 2, 2019 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@anderejd
Copy link
Contributor

anderejd commented Feb 2, 2019

While working towards #30 I'm starting to lean towards splitting this crate into two crates. One crate for the CLI app and one crate for the library parts that can be cleanly decoupled from the command line application.

Any ideas or opinions on this?

Some discussion on naming: https://github.com/rust-lang-nursery/cli-wg/issues/87
Related: #30

@anderejd anderejd added the question Further information is requested label Feb 2, 2019
@anderejd
Copy link
Contributor Author

anderejd commented Feb 2, 2019

To me it seems like the obvious choice to keep cargo-geiger for the CLI application/cargo plugin. But what would be a good name for the library? cargo-geiger-lib? lib-cargo-geiger? Something completely different?

@dpc
Copy link

dpc commented Feb 3, 2019

AFAIK, you can have the same named bin and lib (eg. cargo itself does it). Also, maybe just geiger, since it's potentially usable in places other than cargo anyway.

@anderejd
Copy link
Contributor Author

anderejd commented Feb 3, 2019

you can have the same named bin and lib

Yes, it seems like it works in the current master, haven't tried publishing that to crates.io yet though.

The reason I'm thinking of splitting it into two crates is to limit the public API of the library crate, which I can't seem to figure out how to do with modules only, where the cargo-geiger binary needs to access more modules than the library should expose. It's very possible that I'm overthinking this.

@anderejd
Copy link
Contributor Author

anderejd commented Feb 9, 2019

Fixed by: #51

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

No branches or pull requests

3 participants