Skip to main content

Module vcs

Module vcs 

Source
Expand description

The runtime’s interface to version control.

Versioned symbol resolution (ns/name@commit) and commit-signature verification are the only two places where the interpreter touches git. Calling cljrs_project::vcs directly from here would link gitoxide, rPGP, ssh-key — and, through gix’s blocking http transport, reqwest/hyper/rustls — into every embedding of the interpreter, including ones that never resolve a versioned var.

So the runtime talks to a VcsProvider trait object instead:

  • With the default deps feature on, GlobalEnv::new installs ProjectVcs — the cljrs-project-backed implementation — so behaviour is exactly what it was before the split and no downstream crate changes.
  • Built with --no-default-features, no provider is installed: VcsProvider::find_repo_root never gets asked, so a source file is treated as “not in a git repository”, versioned resolution falls back to embedded (AOT) sources, and gix/pgp/ssh-key are not compiled at all.

The GlobalEnv field holding the provider exists in both configurations, so the struct’s layout does not change with the feature — an embedder that links a deps-less runtime alongside a deps-ful one is not exposed to a feature-unification surprise.

Structs§

ProjectVcs
VcsProvider implemented on top of cljrs_project::vcs (gitoxide for the git side, rPGP / ssh-key for signatures).

Enums§

SignatureFailure
Why a commit-signature check did not succeed.

Traits§

VcsProvider
The git operations the runtime needs, as an interface.

Functions§

default_provider
The provider installed by GlobalEnv::new, or None in builds that carry no VCS implementation.