Git2 Rs

libgit2 bindings for Rust
Alternatives To Git2 Rs
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Nodegit5,3791,4241,1037 months ago145February 10, 2023366mitJavaScript
Native Node bindings to Git.
Pygit21,5143751893 days ago72June 25, 2023166otherC
Python bindings for libgit2
Git2 Rs1,4527858566 days ago115August 28, 2023111apache-2.0Rust
libgit2 bindings for Rust
Php Git540
7 years ago38mitC
PHP bindings for libgit2
Swiftgit2521
32 years agoApril 21, 201551mitSwift
Swift bindings to libgit2
Node Gitteh4281299 years ago10September 23, 201419mitJavaScript
Node.js bindings for libgit2
Gift257
7 years ago10mitSwift
Swift bindings to libgit2. But you should use https://github.com/SwiftGit2/SwiftGit2 instead!
Git2r198153555 months ago26January 26, 202382gpl-2.0C
R bindings to the libgit2 library
Luagit2121
3 years ago4mitC
Lua bindings for libgit2
Gitfordelphi89
11 years ago2mitPascal
Delphi bindings for libgit2
Alternatives To Git2 Rs
Select To Compare


Alternative Project Comparisons
Readme

git2-rs

Documentation

libgit2 bindings for Rust.

[dependencies]
git2 = "0.18.1"

Rust version requirements

git2-rs works with stable Rust, and typically works with the most recent prior stable release as well.

Version of libgit2

Currently this library requires libgit2 1.7.1 (or newer patch versions). The source for libgit2 is included in the libgit2-sys crate so there's no need to pre-install the libgit2 library, the libgit2-sys crate will figure that and/or build that for you.

You can enable the Cargo feature vendored-libgit2 to always compile and statically link to a copy of libgit2. Sometimes the libgit2 on the system is required to be found and used even when vendored-libgit2 is activated. In this case, you shall set the environment variable LIBGIT2_NO_VENDOR=1.

Building git2-rs

$ git clone https://github.com/rust-lang/git2-rs
$ cd git2-rs
$ cargo build

Automating Testing

Running tests and handling all of the associated edge cases on every commit proves tedious very quickly. To automate tests and handle proper stashing and unstashing of unstaged changes and thus avoid nasty surprises, use the pre-commit hook found here and place it into the .git/hooks/ with the name pre-commit. You may need to add execution permissions with chmod +x.

To skip tests on a simple commit or doc-fixes, use git commit --no-verify.

Building on macOS 10.10+

If the ssh feature is enabled (and it is by default) then this library depends on libssh2 which depends on OpenSSL. To get OpenSSL working follow the openssl crate's instructions.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in git2-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Popular Bindings Projects
Popular Libgit2 Projects
Popular Libraries Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Rust
R
Bindings
Commit
Openssl
Libgit2