3 unstable releases
0.2.1 | Oct 14, 2020 |
---|---|
0.2.0 | Oct 14, 2020 |
0.1.0 | Oct 14, 2020 |
#24 in #git-status
200KB
4.5K
SLoC
gitstatusd-rs
Rust bindings to gitstatusd
gitstatusd is a c++ binary that provides extreamly fast alternative
to git status
. This project is a library that make comunicating with
that binary easier.
Useage
gitstatusd = "0.2"
let mut gsd = gitstatusd::SatusDaemon::new("/Users/nixon/bin/gitstatusd", ".").unwrap();
let req = gitstatusd::StatusRequest {
id: "".to_owned(),
dir: "/Users/nixon/dev/rs/gitstatusd".to_owned(),
read_index: gitstatusd::ReadIndex::ReadAll,
};
let rsp = gsd.request(req).unwrap();
assert_eq!(rsp.details.unwrap().commits_ahead, 0);
Contributing
git clone https://github.com/aDotInTheVoid/gitstatusd-rs --recurse-submodules
cd gitstatusd-rs/gitstatusd
bash ./build -w
cd ..
cargo test
A nifty trick to inspect the result of gitstatusd
echo -nE id$'\x1f'`pwd`$'\x1e' | ./gitstatusd/usrbin/gitstatusd | bat -A # or ./gs.sh
The project follows the Rust code of conduct.
License
Copyright © 2020 Nixon Enraght-Moony.
This project is ISC licensed.