Skip to main content

Crate rtb_vcs

Crate rtb_vcs 

Source
Expand description

Release-provider abstractions for the Rust Tool Base.

§What this crate is

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.

§What this crate is not

  • Not Git. Repository operations (Repo, clone, fetch, commit walk) land as rtb-vcs v0.2 at the v0.5 roadmap milestone.
  • Not writeable. ReleaseProvider has four methods, all of them read-only. Creating releases, uploading assets, and editing tags are deliberately out of scope.
  • Not a caching layer. Every call hits the wire. Downstream tools add HTTP caching via reqwest::ClientBuilder::middleware if they need it.

§Foundation

The v0.1.1 release ships the foundation only — trait, value types, error enum, config structs, and the linkme-backed factory registry. Backend implementations land in follow-up releases, feature-gated so downstream tools only compile what they use.

Re-exports§

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

Modules§

bitbucket
Bitbucket backend — Bitbucket Cloud only at v0.1.
codeberg
Codeberg backend — a distinct source_type: codeberg registration whose factory delegates to the Gitea backend with host pinned to codeberg.org.
config
Per-provider typed configuration.
direct
Direct backend — a bare-HTTPS-URL release source for private mirrors, S3-hosted releases, and air-gapped distributions that don’t speak a Git-forge API.
git
Git-operations slice for rtb-vcs v0.2 (the v0.5 framework milestone).
gitea
Gitea backend — self-hosted Gitea instances.
github
GitHub backend — works against GitHub Cloud (api.github.com) and GitHub Enterprise (<enterprise-host>/api/v3).
gitlab
GitLab backend — GitLab Cloud (gitlab.com) and self-hosted instances.
release
The ReleaseProvider trait, value types, error enum, and factory-registration primitives.