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

Make "structopt" dependency optional #239

Closed
adumbidiot opened this issue Feb 2, 2020 · 5 comments · Fixed by #247
Closed

Make "structopt" dependency optional #239

adumbidiot opened this issue Feb 2, 2020 · 5 comments · Fixed by #247
Labels
good first issue Good for newcomers invalid This doesn't seem right

Comments

@adumbidiot
Copy link
Contributor

The structopt dependency seems to be only used for the binaries. It would be nice if it could be disabled if this engine was used as a library. Maybe it could be put behind a cli feature flag or similar and enabled for the binaries only?

@jasonwilliams
Copy link
Member

@adumbidiot that sounds fine to me, is this something you wanted to look at?

@jasonwilliams jasonwilliams added good first issue Good for newcomers invalid This doesn't seem right labels Feb 2, 2020
@adumbidiot
Copy link
Contributor Author

Yeah sure

@Razican
Copy link
Member

Razican commented Feb 3, 2020

Another option would be to separate the crate into two: boa and boa-cli, in the same workspace. This would allow for differentiating the CLI from the library itself, and not require features: each crate would have its own dependencies, and share them if compiled together.

@jasonwilliams
Copy link
Member

@Razican sounds interesting, would it still be easy to develop against the CLI when working against the lib? Ive not split 2 crates in the same project before

@Razican
Copy link
Member

Razican commented Feb 4, 2020

@jasonwilliams it should be easy, yes. Both crates would be in the same repo, with a Cargo.toml especifying the workspace. The Cargo.lock file would be at a workspace level. A huge example with multiple crates can be seen with diesel.

I can do a PR this week to see how it would look like, but I think it should be fairly easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants