Shizcow / dmenu-rs

A pixel perfect port of dmenu, rewritten in Rust with extensive plugin support
GNU General Public License v3.0
202 stars 9 forks source link

Possibility to get on crates.io? #34

Open rypervenche opened 4 years ago

rypervenche commented 4 years ago

I was curious to know if it would be possible for you to publish this on crates.io. I would love to be able to easily download and install this on all of my machines and add it to my package manager without needing to manually maintain its version upgrades. I believe that how you've set up the plugins doesn't make that possible, but perhaps a version without any plugins could be published to crates.io?

I also think that there currently aren't any good replacements for dmenu on crates.io and this works really well. I think others would be able to find this program more easily there.

Thanks!

Shizcow commented 4 years ago

Is crates.io commonly used for end-user programs? I thought that was only for libraries, but my experience is lacking.

As for making this work with plugins, I do have a plan. I'm still working out the implementation kinks (and nightly features), but I hope to eventually have plugins work as independent executable that can hook onto the main dmenu executable -- no recompilation required (a bit like rofi meets emacs). Unfortunately college has killed my free time to work on this project, so this won't come any time soon.

If this is good to publish on crates.io, I'll consider it -- but won't do so until dynamic plugins are supported.

rypervenche commented 4 years ago

Thanks for the very quick reply. Yes, it is my experience that most people install Rust binaries via crates.io, via cargo install <package>. On top of that, tools have been made to utilize cargo to create packages for Linux distributions in an automated way, such as cargo-deb for Debian/Ubuntu packages, cargo-ebuild for Gentoo packages, etc. So having something on crates.io would definitely help with getting this project out there.

Either way, I look forward to the future of this project. And thanks again.

Shizcow commented 4 years ago

Oh, that's super cool. I had no idea the automated cargo distributions were a thing. I'll totally put this on crates.io at some point, but like I said it'll be a little bit. Thanks for the recommendation to do so.

asdf8dfafjk commented 4 years ago

Seeing as this project has external dependencies, I don't think putting on cargo makes sense because people would be furstrated that their cargo install didn't work. I'd recommend that OP tries to package this for his linux distribution and hopefully it is accepted (I know this is a niche program but still).

Also OP, you can always do a cargo install <git address> (assuming your goal is personal use)

rypervenche commented 3 years ago

Seeing as this project has external dependencies, I don't think putting on cargo makes sense because people would be furstrated that their cargo install didn't work. I'd recommend that OP tries to package this for his linux distribution and hopefully it is accepted (I know this is a niche program but still).

Many crates have dependencies that are listed in the README. An example that comes to mind is the opencc-rust crate. So long as it is stated, I still think this is the best method. It also takes the work of packaging this for different Linux distributions off of @Shizcow .

Also OP, you can always do a cargo install <git address> (assuming your goal is personal use)

This is also an acceptable method, although would not get as many people using the program. However, as it stands now, even this won't work properly because of the use of a Makefile in the source code. If a proper build.rs file were used (see here), then cargo --git method would work (although at that point it could be published to crates.io)

Anyways, just putting in my 2 cents. I hope it's useful.

Shizcow commented 3 years ago

If a proper build.rs file were used (see here), then cargo --git method would work (although at that point it could be published to crates.io)

This crate actually uses multiple build.rs scripts. Due to the fact that the main dmenu-build crate has dependencies which can be loaded in depending on the present plugins, a single, traditional build.rs is impossible. At least, I have yet to find how to point Cargo.toml to a file or command (which can change depending on plugins) and not have it blow up. This will be solved far in the future when I finish hotpatch and load in plugins that way, but for now that's how it will stay. Too many other projects and schoolwork.

Thanks for the participation and comments @rypervenche.

sburris0 commented 3 years ago

Using Cargo.toml for builds also enables most distros to make packages very easily (came here looking to make one for Void Linux).