35 releases (breaking)

0.41.0 Oct 22, 2024
0.39.0 Aug 22, 2024
0.38.0 Jul 23, 2024
0.36.0 Mar 14, 2024
0.20.1 Mar 30, 2023

#7 in Configuration

Download history 110643/week @ 2024-07-30 108158/week @ 2024-08-06 109503/week @ 2024-08-13 106031/week @ 2024-08-20 103992/week @ 2024-08-27 121975/week @ 2024-09-03 119637/week @ 2024-09-10 109417/week @ 2024-09-17 115620/week @ 2024-09-24 117567/week @ 2024-10-01 111120/week @ 2024-10-08 124805/week @ 2024-10-15 115950/week @ 2024-10-22 118014/week @ 2024-10-29 123537/week @ 2024-11-05 124284/week @ 2024-11-12

502,619 downloads per month
Used in 242 crates (9 directly)

MIT/Apache

795KB
15K SLoC

gix-config

gix-config is a library for interacting with git-config files.

This crate intents to be a performant Rust implementation for reading and writing git-config files. It exposes tiers of abstractions, from simple config value wrappers to a high level reader and writer.

The highlight of this crate is the zero-copy parser. We employ techniques to avoid copying where necessary, and reads that do not need normalization are guaranteed to be zero-copy. Higher level abstractions maintain this guarantee, and utilizes acceleration structures for increased performance.

Currently, this is not a binary. While we do intent to have a drop-in replacement for the git config sub-command, we're currently missing system-level abstractions to do so.

Contributing

Contributions are always welcome!

Code quality

This repository enables pedantic, cargo, and nursery clippy lints. Make sure to run cargo clean && cargo clippy (the clean stage is very important!) to ensure your code is linted.

Testing

Since this is a performance oriented crate, in addition to well tested code via cargo test, we also perform benchmarks to measure notable gains or losses in performance. We use criterion so benches can be run via cargo bench after installing it via cargo install cargo-criterion.

Changes to parsing code may include a request to fuzz to ensure that it cannot panic on inputs. This can be done by executing cargo +nightly fuzz run parse after installing the fuzz sub-command via cargo install cargo-fuzz.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in gix-config by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~10–19MB
~283K SLoC