zenith icon indicating copy to clipboard operation
zenith copied to clipboard

Crates.io and `cargo install zenith`

Open rrichardson opened this issue 4 years ago • 14 comments

This is really slick! I spend way too much of my time administering and monitoring machines. I like the UX of this, it gives me the numbers I care about in an intuitive way.

I would like to be able just cargo install zenith on machines.

This means you'll need to work something out with the owner of https://crates.io/crates/zenith or rename this.

rrichardson avatar Mar 16 '20 18:03 rrichardson

Thank you for the feedback! I'd love to publish on crates.io. Not sure the other project with that is under active development. Perhaps I'll reach out. Another issue is that I'm using a forked version of sysinfo that adds per process disk usage. I've got a pr open for that but it hasn't yet been merged.

bvaisvil avatar Mar 17 '20 02:03 bvaisvil

Dumb question: Should the repo name and crate name be the same? 🤔 We could use different name in the crate right? Sorry, a newbie here, if that seems too dumb

karuppiah7890 avatar Mar 17 '20 11:03 karuppiah7890

@karuppiah7890 That's a good point, I haven't really explored that.

I'll still need to either publish my own version of sysinfo into crates.io (don't like this idea), have my changes accepted or get the info from another library.

bvaisvil avatar Mar 18 '20 02:03 bvaisvil

I second this. I had read about zenith on a blog, executed cargo install zenith and then launched it. Got a weird output and came here to look for a bug report or more instructions.

I am dumb but it's too easy to install and launch the wrong binary (possibly executing something malicious).

apiraino avatar May 30 '20 20:05 apiraino

The executable name doesn't have to match the crates.io name, but I think it has to match the Cargo.toml project name.

Ripgrep is a good example. Cargo install ripgrep gives you a binary called rg

My recommendation would be to create a uniquely named project in crates.io. Maybe zenith-monitor or something, but the binary can still be named zenith

rrichardson avatar May 31 '20 17:05 rrichardson

Immediate issue blocking progress on this is my git dependency on my own fork of the sysinfo crate.

bvaisvil avatar May 31 '20 18:05 bvaisvil

Is there something special about your sysinfo fork that doesn't apply to the heim crate that you're also specifying a git repo for? I'm not understanding why this being a fork is a blocker.

ghost avatar May 16 '21 16:05 ghost

The heim crate is a git dependency because I needed a fix before an official release (still the case). I have made fixes and enhancements to sysinfo that I haven't yet made PRs for.

bvaisvil avatar May 17 '21 15:05 bvaisvil

I understand the heim crate git dependency. I'm asking why you can't do the same with the sysinfo crate, since they're both on github. I must be missing something, I'm trying to find out what it is.

ghost avatar May 17 '21 15:05 ghost

For example,

  • currently sysinfo doesn't provide the niceness/priority of a pid, my fork does
  • on linux sysinfo, the name of the process is truncated/missing, fixed on my fork
  • on linux sysinfo was missing disks, fixed on my fork etc.

bvaisvil avatar May 17 '21 16:05 bvaisvil

Right. I understand that. I think I'm not being clear. I'm sorry. What I mean is: what breaks with sysinfo if you publish zenith to crates.io as-is? What does having your own fork of sysinfo break when you do that? This is what I don't understand.

ghost avatar May 17 '21 22:05 ghost

You can't publish to crates.io with git dependencies.

bvaisvil avatar May 20 '21 16:05 bvaisvil

Ahh! Thank you! That explains everything.

ghost avatar May 20 '21 16:05 ghost

Is it still blocking after https://github.com/GuillaumeGomez/sysinfo/pull/287 was merged

clouds56 avatar Mar 02 '24 18:03 clouds56