rs-git-fsmonitor
rs-git-fsmonitor copied to clipboard
Add to crates.io to make installing easier?
I understand that crates.io
won't be able to install watchman
automatically, but it'd still be nice.
Habitat isn't really an option for me. But I use Homebrew on Linux and i can install watchman
easily there by hand, and then installed with:
cargo install --git https://github.com/jgavris/rs-git-fsmonitor.git
And it is working perfectly. =] Really like the tool and want to advertise it a bit, but wanted to get the installation steps to be as easy as possible.
(An alternative is to add Linuxbrew support -- currently it "successfully" installs athe macOS binary on Linux...)
You can install it with nix on linux. The package in nix is named gitAndTools.rs-git-fsmonitor and maintained by me.
My goal was to reuse existing installers where possible. Having cargo
available for Rust installations is really pervasive and it seems nice to enable people to leverage that rather than needing to add yet another package management layer for their system.
I don't have rust installed and it just dumps a whole lot of stuff into my home directory. Also I need to remember to update things and you can't use brew to manage packages on multiple machines or uninstall things.
Sure, I understand that it isn't good for everyone. But for some, it would be helpful. Not sure why adding it to crates.io would mean not providing the nice Homebrew integration where possible. 🤷
I'm happy to merge any documentation for installation you folks provide. The more the merrier.
@chandlerc would you mind adding instructions for cargo
? Is there any benefit to publishing a crate versus installing directly from a git repo (semantically similar to the brew tap
I started with)?
@SuperSandro2000 would you mind putting up a PR for instructions for installing with nix
?
would you mind putting up a PR for instructions for installing with
nix
?
The problem is that people need to write it into their configuration files to permanently use it and there is no way one liner to do that. I could add a comment to quickly test it though.
nix-shell -p gitAndTools.rs-fs-minitor
IIRC
I'm happy to merge any documentation for installation you folks provide. The more the merrier.
@chandlerc would you mind adding instructions for
cargo
?
cargo install --git https://github.com/jgavris/rs-git-fsmonitor.git
Is there any benefit to publishing a crate versus installing directly from a git repo (semantically similar to the
brew tap
I started with)?
Management of release versions? Updating to new versions when released? Follows the standards for installing (even binary) Rust tools... ripgrep
, bat
, fd-find
, skim
, etc....
Related: https://twitter.com/chandlerc1024/status/1354689408646090753
@chandlerc very good points about managing release versions. I suppose I hadn't prioritized that because there has been only 1 meaningful release since the initial one (the v2 hook) of the monitor protocol. But I will definitely clean up the release / distribution process soon, especially if a v3 hook comes out. I'd love to join the infamy of ripgrep
and friends, I'm 💯 team Rust.
I will be pushing an Apple Silicon (fat binary) build soon, with a couple more small optimizations.
Also trying work through using the BSER
protocol for watchman
which might get a couple more milliseconds.
For macOS and Windows users, happy to note that a 'fast' fsmonitor
is now built in to Git 2.37. See the post here from some awesome contributions from Microsoft. https://github.blog/2022-06-27-highlights-from-git-2-37/#a-builtin-filesystem-monitor-for-windows-and-macos
Linux users may have to wait a little longer for native support, or can keep using this one. But the built-in fsmonitor
in git
2.37 is even faster than this version by a few milliseconds. Possibly using BSER
over JSON
might get us closer, I'd have to read more into why the C implementation is a fair bit faster than this Rust + Watchman version.