88[ ![ License] ( https://img.shields.io/crates/l/postgresql_archive? )] ( https://github.com/theseus-rs/postgresql-embedded/tree/main/postgresql_archive#license )
99[ ![ Semantic Versioning] ( https://img.shields.io/badge/%E2%9A%99%EF%B8%8F_SemVer-2.0.0-blue )] ( https://semver.org/spec/v2.0.0.html )
1010
11- A library for downloading and extracting PostgreSQL archives.
11+ A configurable library for downloading and extracting PostgreSQL archives.
1212
1313## Examples
1414
1515### Asynchronous API
1616
1717``` rust
18- use postgresql_archive :: {extract, get_archive, Result , LATEST };
18+ use postgresql_archive :: {extract, get_archive, Result , VersionReq };
19+ use postgresql_archive :: configuration :: theseus;
1920
2021#[tokio:: main]
2122async fn main () -> Result <()> {
22- let (archive_version , archive ) = get_archive (& LATEST ). await ? ;
23+ let url = theseus :: URL ;
24+ let (archive_version , archive ) = get_archive (url , & VersionReq :: STAR ). await ? ;
2325 let out_dir = std :: env :: temp_dir ();
24- extract (& archive , & out_dir ). await
26+ extract (url , & archive , & out_dir ). await
2527}
2628```
2729
2830### Synchronous API
2931
3032``` rust
31- use postgresql_archive :: {Result , LATEST };
33+ use postgresql_archive :: configuration :: theseus;
34+ use postgresql_archive :: {Result , VersionReq };
3235use postgresql_archive :: blocking :: {extract, get_archive};
3336
3437fn main () -> Result <()> {
35- let (archive_version , archive ) = get_archive (& LATEST )? ;
38+ let url = theseus :: URL ;
39+ let (archive_version , archive ) = get_archive (url , & VersionReq :: STAR )? ;
3640 let out_dir = std :: env :: temp_dir ();
37- extract (& archive , & out_dir )
41+ extract (url , & archive , & out_dir )
3842}
3943```
4044
@@ -53,36 +57,10 @@ The following features are available:
5357
5458## Supported platforms
5559
56- ` postgresql_archive ` supports all platforms provided
57- by [ theseus-rs/postgresql-binaries] ( https://github.com/theseus-rs/postgresql-binaries ) .
58-
59- Currently supported platforms are:
60-
61- | OS | [ Target] ( https://doc.rust-lang.org/nightly/rustc/platform-support.html ) |
62- | ---------| -------------------------------------------------------------------------|
63- | Linux | aarch64-unknown-linux-gnu |
64- | Linux | aarch64-unknown-linux-musl |
65- | Linux | arm-unknown-linux-gnueabi |
66- | Linux | arm-unknown-linux-gnueabihf |
67- | Linux | arm-unknown-linux-musleabi |
68- | Linux | arm-unknown-linux-musleabihf |
69- | Linux | armv5te-unknown-linux-gnueabi |
70- | Linux | armv7-unknown-linux-gnueabihf |
71- | Linux | armv7-unknown-linux-musleabihf |
72- | Linux | i586-unknown-linux-gnu |
73- | Linux | i586-unknown-linux-musl |
74- | Linux | i686-unknown-linux-gnu |
75- | Linux | i686-unknown-linux-musl |
76- | Linux | mips64-unknown-linux-gnuabi64 |
77- | Linux | powerpc64le-unknown-linux-gnu |
78- | Linux | powerpc64le-unknown-linux-musl |
79- | Linux | s390x-unknown-linux-gnu |
80- | Linux | s390x-unknown-linux-musl |
81- | Linux | x86_64-unknown-linux-gnu |
82- | Linux | x86_64-unknown-linux-musl |
83- | MacOS | aarch64-apple-darwin |
84- | MacOS | x86_64-apple-darwin |
85- | Windows | x86_64-pc-windows-msvc |
60+ ` postgresql_archive ` provides implementations for the following:
61+
62+ * [ theseus-rs/postgresql-binaries] ( https://github.com/theseus-rs/postgresql-binaries )
63+ * [ zonkyio/embedded-postgres-binaries] ( https://github.com/zonkyio/embedded-postgres-binaries )
8664
8765## Safety
8866
0 commit comments