lints.workspace = true [package] name = "gix-protocol" version = "0.63.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project for implementing git protocols" authors = ["Sebastian Thiel "] edition = "2024" include = ["/src/**/*", "/LICENSE-*", "!/tests/**/*"] rust-version = "1.85" [lib] doctest = false [features] #! ### Client I/O modes #! The _client_ portion of the protocol uses `gix-transport` to communicate to a server. For it to be available, one of the following features must #! be selected. #! #! Both client features can be enabled together. Existing mode-specific `_blocking` and `_async` methods are then both available, #! while APIs shared by both modes select the blocking implementation. ## If set, blocking command implementations are available and will use the blocking version of the `gix-transport` crate. blocking-client = [ "gix-transport/blocking-client", "handshake", "fetch" ] ## As above, but provides async implementations instead. # no `dep:` for futures-lite (https://github.com/rust-secure-code/cargo-auditable/issues/124) async-client = [ "gix-transport/async-client", "dep:async-trait", "dep:futures-io", "futures-lite", "handshake", "fetch" ] ## Add implementations for performing a `handshake` along with the dependencies needed for it. handshake = ["dep:gix-credentials"] ## Add implementations for performing a `fetch` (for packs) along with the dependencies needed for it. fetch = [ "dep:gix-negotiate", "dep:gix-object", "dep:gix-revwalk", "dep:gix-lock", "dep:gix-refspec", "dep:gix-trace", ] #! ### Other ## Enable support for the SHA-1 hash by enabling the respective feature in the `gix-hash` crate. sha1 = ["gix-hash/sha1"] ## Enable support for the SHA-256 hash by enabling the respective feature in the `gix-hash` crate. sha256 = ["gix-hash/sha256"] ## Data structures implement `serde::Serialize` and `serde::Deserialize`. serde = ["dep:serde", "bstr/serde", "gix-transport/serde", "gix-hash/serde", "gix-shallow/serde"] [[test]] name = "blocking" path = "tests/blocking-protocol.rs" required-features = ["blocking-client"] [[test]] name = "async" path = "tests/async-protocol.rs" required-features = ["async-client"] [dependencies] gix-features = { version = "^0.48.1", path = "../gix-features", features = [ "progress", ] } gix-transport = { version = "^0.57.2", path = "../gix-transport" } gix-hash = { version = "^0.25.1", path = "../gix-hash" } gix-shallow = { version = "^0.12.1", path = "../gix-shallow" } gix-date = { version = "^0.15.6", path = "../gix-date" } gix-utils = { version = "^0.3.4", path = "../gix-utils" } gix-ref = { version = "^0.65.0", path = "../gix-ref" } gix-trace = { version = "^0.1.20", path = "../gix-trace", optional = true } gix-negotiate = { version = "^0.33.0", path = "../gix-negotiate", optional = true } gix-object = { version = "^0.62.0", path = "../gix-object", optional = true } gix-revwalk = { version = "^0.33.0", path = "../gix-revwalk", optional = true } gix-credentials = { version = "^0.38.2", path = "../gix-credentials", optional = true } gix-refspec = { version = "^0.43.0", path = "../gix-refspec", optional = true } gix-lock = { version = "^23.0.0", path = "../gix-lock", optional = true } thiserror = "2.0.18" nonempty = "0.12.0" serde = { version = "1.0.114", optional = true, default-features = false, features = [ "derive", ] } bstr = { version = "1.12.0", default-features = false, features = [ "std", "unicode", ] } # for async-client async-trait = { version = "0.1.51", optional = true } futures-io = { version = "0.3.32", optional = true } futures-lite = { version = "2.1.0", optional = true } bisync = "0.3.0" document-features = { version = "0.2.0", optional = true } [dev-dependencies] async-std = { version = "1.9.0", features = ["attributes"] } gix-packetline = { path = "../gix-packetline", version = "^0.21.4" } gix-protocol = { path = "../gix-protocol", features = ["sha1"] } [package.metadata.docs.rs] features = ["sha1", "blocking-client", "document-features", "serde"]