Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move binaries to another crate to clean up dependencies #15

Closed
EthanYidong opened this issue Feb 24, 2021 · 6 comments
Closed

Move binaries to another crate to clean up dependencies #15

EthanYidong opened this issue Feb 24, 2021 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@EthanYidong
Copy link

Using this crate as a library requires pulling and building structopt which is unnecessary and introduces 100+ extra dependencies. Creating a workspace and a separate crate for the binaries would solve this.

@YaLTeR YaLTeR added the enhancement New feature or request label Feb 25, 2021
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 25, 2021

Yeah, that definitely doesn't sound right. Is there a way to specify that a dependency is only for the binaries maybe?

@bugaevc
Copy link
Collaborator

bugaevc commented Feb 25, 2021

Is dev-dependencies not it?

Also, perhaps take a look at argh, which is a lot like structopt, but leaner & lighter in dependencies.

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 25, 2021

Is dev-dependencies not it?

Apparently not.

@YaLTeR YaLTeR added the good first issue Good for newcomers label Feb 25, 2021
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 25, 2021

If I'm not mistaken, dependencies only used in binaries are mime_guess, stderrlog, exitfailure and structopt.

@7b4software
Copy link
Contributor

You can use workspaces and cleanup the repo. keep project in this repo split code binaries and lib in two crates something like:

in root Cargo.toml you just put
[workspace]
members = ["libwl-clipboard", "wl-clipboard-tools"]

then in the subdirs you add the "real" cargo.toml and its dependencies.

libwl-clipboard # publish as new crate
wl-clipboard-tools # publish as second crate (the binaries)

mark the old crate as deprecated.

@YaLTeR YaLTeR closed this as completed Jan 15, 2022
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 15, 2022

Closed by #19.

piegamesde added a commit to piegamesde/cli-clipboard that referenced this issue Mar 16, 2022
piegamesde added a commit to piegamesde/cli-clipboard that referenced this issue Mar 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants