Skip to main content

Crate quilt_rs

Crate quilt_rs 

Source
Expand description

§quilt-rs

Rust library for accessing Quilt data packages.

Quilt provides Git-like version control semantics for data files through content-addressed storage with immutable objects and distributed collaboration via remote storage backends.

§Quick Start

For all operations, instantiate LocalDomain and then call some of its methods.

use std::path::PathBuf;
use quilt_rs::{LocalDomain, uri::{S3PackageUri, ManifestUri}};

// Create a local domain for package management
let path = PathBuf::from("/foo/bar");
let local_domain = LocalDomain::new(path);

// Create a manifest URI from a package URI
let package_uri = S3PackageUri::try_from("quilt+s3://bucket#package=namespace@hash")?;
let manifest_uri = ManifestUri::try_from(package_uri)?;

// Install the package
let installed_package = local_domain.install_package(&manifest_uri).await?;

§Workflow

  1. Browse — discover remote packages (flow::browse)
  2. Install — register package tracking (flow::install_package)
  3. Install Paths — download content to working directory (flow::install_paths)
  4. Status — detect modifications (flow::status)
  5. Commit — create a local package version (flow::commit_package)
  6. Push — upload changes to remote (flow::push_package)

§Hash Algorithms

Supports multiple algorithms via checksum::ObjectHash:

  • SHA256 — general-purpose cryptographic hash
  • CRC64 — fast checksum for large files
  • SHA256-Chunked — parallel hashing for very large files

§Further Reading

Re-exports§

pub use error::Error;

Modules§

auth
checksum
This module contains helpers and structs for creating and managing checkums.
error
flow
It is public only for documentation. This module namespace contains higher-order operations with packages. But you don’t need to use it outise of this crate. All these functions are wrapped with LocalDomain methods with some context.
io
Contains helpers and wrappers to work with IO.
lineage
Module that contains various structs and helpers to work with .quilt/lineage.json.
manifest
Namespace contains helpers to work with manifest and its content (rows).
paths
Incapsulated knowlegde about directory structure of the files in .quilt, packages and working directories.
uri
Namespace containing various URIs. Most of them you can convert one to another.

Structs§

InstalledPackage
Similar to LocalDomain because it has access to the same lineage file and remote/storage traits. But it only manages one particular installed package. It can be instantiated from LocalDomain by installing new or listing existing packages.
LocalDomain
This is the entrypoint for the lib. All the work you can do with packages is done through calling LocalDomain methods.

Type Aliases§

Res