From 65c10aa8d5000e0ecab34a9652056f0520fe51ed Mon Sep 17 00:00:00 2001 From: Calvin Wan Date: Wed, 29 Jan 2025 13:50:44 -0800 Subject: libgit: add higher-level libgit crate The C functions exported by libgit-sys do not provide an idiomatic Rust interface. To make it easier to use these functions via Rust, add a higher-level "libgit" crate, that wraps the lower-level configset API with an interface that is more Rust-y. This combination of $X and $X-sys crates is a common pattern for FFI in Rust, as documented in "The Cargo Book" [1]. [1] https://doc.rust-lang.org/cargo/reference/build-scripts.html#-sys-packages Co-authored-by: Josh Steadmon Signed-off-by: Josh Steadmon Signed-off-by: Calvin Wan Signed-off-by: Junio C Hamano --- contrib/libgit-rs/src/lib.rs | 1 + 1 file changed, 1 insertion(+) create mode 100644 contrib/libgit-rs/src/lib.rs (limited to 'contrib/libgit-rs/src/lib.rs') diff --git a/contrib/libgit-rs/src/lib.rs b/contrib/libgit-rs/src/lib.rs new file mode 100644 index 0000000000..ef68c36943 --- /dev/null +++ b/contrib/libgit-rs/src/lib.rs @@ -0,0 +1 @@ +pub mod config; -- cgit v1.3-5-g9baa