#git2 #curl #http #libgit2 #transport #backend

git2-curl

Backend for an HTTP transport in libgit2 powered by libcurl. Intended to be used with the git2 crate

26 releases (16 breaking)

0.17.0 Jan 10, 2023
0.16.0 Jul 28, 2022
0.15.0 Feb 28, 2022
0.14.1 Aug 19, 2020
0.2.2 Mar 25, 2015

#110 in Network programming

Download history 28669/week @ 2022-11-28 28204/week @ 2022-12-05 28509/week @ 2022-12-12 26064/week @ 2022-12-19 19603/week @ 2022-12-26 24807/week @ 2023-01-02 35915/week @ 2023-01-09 34024/week @ 2023-01-16 35537/week @ 2023-01-23 35703/week @ 2023-01-30 34310/week @ 2023-02-06 37017/week @ 2023-02-13 35403/week @ 2023-02-20 35550/week @ 2023-02-27 37862/week @ 2023-03-06 33529/week @ 2023-03-13

146,352 downloads per month
Used in 121 crates (4 directly)

MIT/Apache

1MB
18K SLoC

A crate for using libcurl as a backend for HTTP git requests with git2-rs.

This crate provides one public function, register, which will register a custom HTTP transport with libcurl for any HTTP requests made by libgit2. At this time the register function is unsafe for the same reasons that git2::transport::register is also unsafe.

It is not recommended to use this crate wherever possible. The current libcurl backend used, curl-rust, only supports executing a request in one method call implying no streaming support. This consequently means that when a repository is cloned the entire contents of the repo are downloaded into memory, and then written off to disk by libgit2 afterwards. It should be possible to alleviate this problem in the future.

NOTE: At this time this crate likely does not support a git push operation, only clones.

Dependencies

~23MB
~521K SLoC