rtb-forge 0.8.1

Release-provider abstractions and backends (GitHub, GitLab, Bitbucket, Gitea, Codeberg, Direct) plus an async git-operations Repo built on gix. Part of the phpboyscout Rust toolkit.
Documentation
//! Release-provider abstractions and git operations for the
//! phpboyscout Rust toolkit.
//!
//! Formerly `rtb-vcs` in the
//! [rust-tool-base](https://gitlab.com/phpboyscout/rust-tool-base)
//! monorepo — renamed to `rtb-forge` at extraction for name
//! convergence with the GTB family. Only the crate identity changed:
//! types, modules, Cargo features, and the `RTB_VCS_GIT_TOKEN` auth
//! environment variable are exactly those of `rtb-vcs` 0.7.0.
//!
//! # What this crate is
//!
//! Two independent slices:
//!
//! - **Release providers.** A narrow, read-only abstraction over
//!   release-source APIs. Tool authors pick one of six backends —
//!   GitHub, GitLab, Bitbucket, Gitea, Codeberg, or Direct (bare HTTPS
//!   URL) — and `rtb-update` consumes the trait to list, fetch, and
//!   download release artefacts. Each backend is behind its own Cargo
//!   feature, all default-on.
//! - **Git operations.** The `git` module's `Repo` type: init, open,
//!   clone, fetch, status, commit, checkout, walk, diff, blame and
//!   push. Behind the default-on `git` feature.
//!
//! # What this crate is not
//!
//! - **Not a release writer.** `ReleaseProvider` has four methods, all
//!   of them read-only. Creating releases, uploading assets, and
//!   editing tags are deliberately out of scope.
//! - **Not a general git library.** `Repo` covers the operations above
//!   and stops: no branch, merge, rebase, stash, tag or remote
//!   management.
//! - **Not a caching layer.** Every call hits the wire. Downstream
//!   tools add HTTP caching via `reqwest::ClientBuilder::middleware`
//!   if they need it.

// `deny`, not `forbid`: `linkme`'s `#[distributed_slice]` emits
// `#[link_section]`, which Rust 1.95+ reports under `unsafe_code`, and
// only `deny` lets each registration module carry a local
// `#![allow(unsafe_code)]`. Any rtb-* crate with a `linkme` site makes
// the same trade. No hand-written `unsafe` block exists in this crate.
#![deny(unsafe_code)]

pub mod config;
pub mod release;

// v0.5 git-operations slice — entire module gated on the `git` feature.
// See spec 0023: https://gitlab.com/phpboyscout/rust-tool-base/-/wikis/specs/0023-v0.5-scope
#[cfg(feature = "git")]
pub mod git;

// Shared HTTP helpers for the REST-API backends. `pub(crate)` —
// downstream custom backends roll their own.
#[cfg(feature = "_http")]
pub(crate) mod http;

#[cfg(feature = "bitbucket")]
pub mod bitbucket;
#[cfg(feature = "codeberg")]
pub mod codeberg;
#[cfg(feature = "direct")]
pub mod direct;
#[cfg(feature = "gitea")]
pub mod gitea;
#[cfg(feature = "github")]
pub mod github;
#[cfg(feature = "gitlab")]
pub mod gitlab;

pub use config::{
    BitbucketParams, CodebergParams, DirectParams, GiteaParams, GithubParams, GitlabParams,
    ReleaseSourceConfig,
};
pub use release::{
    lookup, registered_types, ProviderError, ProviderFactory, ProviderRegistration,
    RegisteredProvider, Release, ReleaseAsset, ReleaseProvider, RELEASE_PROVIDERS,
};