gitstatusd

Crates.iogitstatusd
lib.rsgitstatusd
version0.2.1
sourcesrc
created_at2020-10-14 07:53:20.056616
updated_at2020-10-14 18:25:42.547596
descriptionBindings to gitstatusd
homepagehttps://github.com/aDotInTheVoid/gitstatusd-rs
repositoryhttps://github.com/aDotInTheVoid/gitstatusd-rs
max_upload_size
id299560
size371,345
Alona Enraght-Moony (aDotInTheVoid)

documentation

README

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.

Commit count: 14

cargo fmt