Crates.io | postgresql_archive |
lib.rs | postgresql_archive |
version | 0.17.3 |
source | src |
created_at | 2024-02-10 02:28:36.875831 |
updated_at | 2024-11-12 20:20:00.086535 |
description | A library for downloading and extracting PostgreSQL archives |
homepage | |
repository | https://github.com/theseus-rs/postgresql-embedded |
max_upload_size | |
id | 1134672 |
size | 112,273 |
A configurable library for downloading and extracting PostgreSQL archives.
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
}
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)
}
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 |
native-tls |
Enables native-tls support | Yes |
rustls-tls |
Enables rustls-tls support | No |
Name | Description | Default? |
---|---|---|
theseus |
Enables theseus PostgreSQL binaries | Yes |
zonky |
Enables zonky PostgreSQL binaries | No |
Name | Description | Default? |
---|---|---|
md5 |
Enables md5 hashers | No |
sha1 |
Enables sha1 hashers | No |
sha2 |
Enables sha2 hashers | Yes¹ |
¹ enabled by the theseus
feature flag.
Name | Description | Default? |
---|---|---|
github |
Enables github repository | Yes¹ |
maven |
Enables maven repository | No |
¹ enabled by the theseus
feature flag.
postgresql_archive
provides implementations for the following:
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
Licensed under either of
at your option.
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.