YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

Move binaries to another crate to clean up dependencies #15

Closed EthanYidong closed 2 years ago

EthanYidong commented 3 years ago

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 commented 3 years ago

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

bugaevc commented 3 years ago

Is dev-dependencies not it?

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

YaLTeR commented 3 years ago

Is dev-dependencies not it?

Apparently not.

YaLTeR commented 3 years ago

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

7b4software commented 2 years ago

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 commented 2 years ago

Closed by #19.