postgresql_archive

Crates.iopostgresql_archive
lib.rspostgresql_archive
version
sourcesrc
created_at2024-02-10 02:28:36.875831+00
updated_at2025-04-03 21:10:46.571631+00
descriptionA library for downloading and extracting PostgreSQL archives
homepage
repositoryhttps://github.com/theseus-rs/postgresql-embedded
max_upload_size
id1134672
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Brian Heineman (brianheineman)

documentation

README

PostgreSQL Archive

ci Documentation Code Coverage Benchmarks Latest version License Semantic Versioning

A configurable library for downloading and extracting PostgreSQL archives.

Examples

Asynchronous API

use postgresql_archive::{extract, get_archive, Result, VersionReq};
use postgresql_archive::configuration::theseus;

#[tokio::main]
async fn main() -> Result<()> {
    let url = theseus::URL;
    let (archive_version, archive) = get_archive(url, &VersionReq::STAR).await?;
    let out_dir = std::env::temp_dir();
    extract(url, &archive, &out_dir).await
}

Synchronous API

use postgresql_archive::configuration::theseus;
use postgresql_archive::{Result, VersionReq};
use postgresql_archive::blocking::{extract, get_archive};

fn main() -> Result<()> {
    let url = theseus::URL;
    let (archive_version, archive) = get_archive(url, &VersionReq::STAR)?;
    let out_dir = std::env::temp_dir();
    extract(url, &archive, &out_dir)
}

Feature flags

postgresql_archive uses [feature flags] to address compile time and binary size uses.

The following features are available:

Name Description Default?
blocking Enables the blocking API No
indicatif Enables tracing-indcatif support No
native-tls Enables native-tls support Yes
rustls Enables rustls support No

Configurations

Name Description Default?
theseus Enables theseus PostgreSQL binaries Yes
zonky Enables zonky PostgreSQL binaries No

Hashers

Name Description Default?
md5 Enables md5 hashers No
sha1 Enables sha1 hashers No
sha2 Enables sha2 hashers Yes¹

¹ enabled by the theseus feature flag.

Repositories

Name Description Default?
github Enables github repository Yes¹
maven Enables maven repository No

¹ enabled by the theseus feature flag.

Supported platforms

postgresql_archive provides implementations for the following:

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% safe Rust.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 503

cargo fmt