Cargo Features

[dependencies]
gitoid = { version = "0.9.0", default-features = false, features = ["async", "hash-sha1", "hash-sha1cd", "hash-sha256", "std", "backend-rustcrypto", "backend-boringssl", "backend-openssl"] }
default = async, backend-rustcrypto, hash-sha256, std

By default, you get:

- Async support.
- The 'rustcrypto' backend.
- The SHA-256 algorithm.
- Standard library support.

async default = std

Async support is optional. That said, it's currently only with Tokio, meaning you'd need to handle integrating with any other async runtime yourself. In the future it may be nice to make our async support fully generic and not specific to a given runtime.

Note also that async support implies using the standard library, as Tokio is not no_std-compatible.

Enables tokio

Need "rt" and "fs" additionally for tests.

hash-sha1 backend-boringssl? backend-openssl?

All hash algorithms are optional, though you need to have at least one algorithm turned on for this crate to be useful. This is intended to just let you avoid paying the cost of algorithms you don't use.

Enables sha1

Affects boringssl::Sha256, boringssl::Sha1, openssl::Sha256, openssl::Sha1, rustcrypto::Sha1

hash-sha1cd

Enables sha1collisiondetection

Affects rustcrypto::Sha1Cd

hash-sha256 default backend-boringssl? backend-openssl?

Enables sha2

Affects rustcrypto::Sha256

std default async

Get standard library support.

This feature is enabled by default. You can disable it to run in environments without std, usually embedded environments.

Enables url, runtime-dispatch-simd of bytecount, std of optional sha1, optional sha1collisiondetection, and optional sha2 and hex and serde

hex:

std-requiring dependencies.

and std of digest

no_std compatible dependencies.

NOTE: Must match the version used in the hash crate.

Technically, we could rely on the re-export from one of those crates,
but since all the hash crates are optional dependencies our usage code within the 'gitoid' crate would be more complex to handle the possibility for any/all of them to be missing. It's simpler to just specify it here so we know we always get the crate.

backend-rustcrypto default

Enable using RustCrypto as a cryptography backend.

Affects backend::rustcrypto

backend-boringssl = hash-sha1, hash-sha256

Enable using BoringSLL as a cryptography backend.

NOTE: This unconditionally turns on the "sha1" and "sha256" features, because the boring crate which provides the BoringSSL cryptography implementations does not permit conditionally compiling those implementations out. Since they're always present, we might as well use them unconditionally.

Enables boring

Affects backend::boringssl

backend-openssl = hash-sha1, hash-sha256

Enable using OpenSSL as a cryptography backend.

NOTE: Like the "boringssl" feature, this unconditionally turns on the "sha1" and "sha256" features, as they're not able to be conditionally compiled out of the dependency, so there's no reason to omit them here.

Enables openssl

Affects backend::openssl