summaryrefslogtreecommitdiffstats
path: root/vendor/gix-config/README.md
blob: 8118d83c9cf73a7ae94bd8f60a9c4224127f98ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# gix-config

**gix-config is a library for interacting with `gix-config` files.**

This crate intents to be a performant Rust implementation for reading and
writing `gix-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

<sup>
Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
</sup>

<br>

<sub>
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.
</sub>

[`criterion`]: https://github.com/bheisler/criterion.rs