Skip to main content

Module fetch

Module fetch 

Source
Expand description

Dependency acquisition layer for the Soroban DevKit (sdkt), .

Provides a reusable abstraction for fetching package dependencies into a deterministic local cache. This milestone implements Git acquisition (via the git CLI) and a path (local) source that needs no fetch. The DependencyFetcher trait is the seam: a future registry source can be added as another implementation without touching callers.

Design goals:

  • No network during tests — tests use on-the-fly local git repositories.
  • Deterministic cache layout: <cache_root>/git/<stable-hash>/ so repeated fetches are idempotent.
  • No authentication helpers, no registry. The Git backend shells out to the system git binary (assumed present, like cargo/rustc).
  • Never builds — fetch only materializes source; building is the caller’s responsibility.

Structs§

FetchOutcome
The outcome of a fetch operation for one dependency.
GitFetcher
Git-backed dependency fetcher.
PathResolver
A no-network “fetcher” for local path dependencies: it only validates that the path exists and returns it unchanged.

Enums§

FetchError
Errors raised while acquiring a dependency.

Traits§

DependencyFetcher
A source a dependency can be acquired from.

Functions§

git_bin
Resolve the git executable.
git_cache_key
Stable, filesystem-safe cache key for a Git dependency.