|
96 | 96 | doc = "* [`http`]: [HTTP/WebDAV Storage](https://datatracker.ietf.org/doc/html/rfc2518). See [`HttpBuilder`](http::HttpBuilder)" |
97 | 97 | )] |
98 | 98 | //! |
| 99 | +//! See [Feature Flags](#feature-flags) for the full set of flags. |
| 100 | +//! |
99 | 101 | //! # Why not a Filesystem Interface? |
100 | 102 | //! |
101 | 103 | //! The [`ObjectStore`] interface is designed to mirror the APIs |
|
517 | 519 | //! [Apache Iceberg]: https://iceberg.apache.org/ |
518 | 520 | //! [Delta Lake]: https://delta.io/ |
519 | 521 | //! |
| 522 | +//! # Feature Flags |
| 523 | +//! |
| 524 | +//! The feature set is layered so that you can pick a provider independently |
| 525 | +//! of its HTTP transport: |
| 526 | +//! |
| 527 | +//! * `cloud-base` holds the shared provider implementation (XML/JSON parsing, |
| 528 | +//! credentials, retry, etc.) and intentionally does *not* depend on |
| 529 | +//! `reqwest`. |
| 530 | +//! * `reqwest` enables the built-in [`reqwest`]-based [`HttpConnector`]. |
| 531 | +//! * `<provider>-base` (`aws-base`, `azure-base`, `gcp-base`, `http-base`) |
| 532 | +//! adds the per-provider logic on top of `cloud-base` without pulling in |
| 533 | +//! `reqwest`. |
| 534 | +//! * `<provider>` (`aws`, `azure`, `gcp`, `http`) is the batteries-included |
| 535 | +//! alias for `<provider>-base` + `reqwest` and is the typical choice. |
| 536 | +//! |
| 537 | +//! ## Provider features |
| 538 | +//! |
| 539 | +//! | Feature | Enables | Notes | |
| 540 | +//! | --- | --- | --- | |
| 541 | +//! | `aws` | `aws-base` + `reqwest` | Amazon S3 with the built-in HTTP transport. | |
| 542 | +//! | `azure` | `azure-base` + `reqwest` | Azure Blob Storage with the built-in HTTP transport. | |
| 543 | +//! | `gcp` | `gcp-base` + `reqwest` | Google Cloud Storage with the built-in HTTP transport. | |
| 544 | +//! | `http` | `http-base` + `reqwest` | HTTP/WebDAV with the built-in HTTP transport. | |
| 545 | +//! | `aws-base` | provider only | S3 provider without `reqwest`; supply your own [`HttpConnector`]. | |
| 546 | +//! | `azure-base` | provider only | Azure provider without `reqwest`; supply your own [`HttpConnector`]. | |
| 547 | +//! | `gcp-base` | provider only | GCS provider without `reqwest`; supply your own [`HttpConnector`]. | |
| 548 | +//! | `http-base` | provider only | HTTP/WebDAV provider without `reqwest`; supply your own [`HttpConnector`]. | |
| 549 | +//! |
| 550 | +//! ## Transport and shared features |
| 551 | +//! |
| 552 | +//! | Feature | Description | |
| 553 | +//! | --- | --- | |
| 554 | +//! | `reqwest` | Enables the default [`reqwest`]-based [`HttpConnector`]. Pulled in automatically by `aws`, `azure`, `gcp`, and `http`. | |
| 555 | +//! | `tls-webpki-roots` | When `reqwest` is enabled, also bundle Mozilla's [`webpki-roots`] CA certificates. See [TLS Certificates](#tls-certificates). | |
| 556 | +//! | `cloud-base` | Shared cloud-provider implementation. Pulled in automatically by every `*-base` feature; usually not enabled directly. | |
| 557 | +//! | `cloud` | Back-compat alias for `cloud-base` + `reqwest`. Kept for users that previously depended on the `cloud` umbrella feature. | |
| 558 | +//! |
| 559 | +//! ## Other features |
| 560 | +//! |
| 561 | +//! | Feature | Description | |
| 562 | +//! | --- | --- | |
| 563 | +//! | `fs` *(default)* | Local filesystem store via [`LocalFileSystem`](local::LocalFileSystem). | |
| 564 | +//! | `tokio` | Enables Tokio-based utilities such as [`BufReader`](buffered::BufReader) and [`BufWriter`](buffered::BufWriter). Pulled in automatically by `fs` and the `*-base` features. | |
| 565 | +//! | `integration` | Exposes the [`integration`] module, a reusable test suite for verifying custom [`ObjectStore`] implementations. Not API-stable. | |
| 566 | +//! |
520 | 567 | //! # TLS Certificates |
521 | 568 | //! |
522 | 569 | //! Stores that use HTTPS/TLS (this is true for most cloud stores) can choose the source of their [CA] |
|
533 | 580 | //! Many [`ObjectStore`] implementations permit customization of the HTTP client via |
534 | 581 | //! the [`HttpConnector`] trait and utilities in the [`client`] module. |
535 | 582 | //! Examples include injecting custom HTTP headers or using an alternate |
536 | | -//! tokio Runtime I/O requests. |
| 583 | +//! tokio Runtime for I/O requests. To replace `reqwest` entirely (rather than |
| 584 | +//! tweak the bundled transport) see [Disabling `reqwest`](#disabling-reqwest). |
537 | 585 | //! |
538 | 586 | //! [`HttpConnector`]: client::HttpConnector |
| 587 | +//! |
| 588 | +//! # Disabling `reqwest` |
| 589 | +//! |
| 590 | +//! The `aws`, `azure`, `gcp`, and `http` features each bundle a |
| 591 | +//! [`reqwest`]-based HTTP transport, which is the right choice for most |
| 592 | +//! applications. If you would rather supply your own HTTP client — for example |
| 593 | +//! to share an existing client, to target a platform where `reqwest` does not |
| 594 | +//! compile (such as `wasm32-wasip1`), or to keep `reqwest` out of your |
| 595 | +//! dependency tree — use the matching `*-base` feature and provide an |
| 596 | +//! [`HttpConnector`](client::HttpConnector) at builder time. |
| 597 | +//! |
| 598 | +//! Remember to disable the default features so that `fs` (and its transitive |
| 599 | +//! dependencies) is not pulled in: |
| 600 | +//! |
| 601 | +//! ```toml |
| 602 | +//! [dependencies] |
| 603 | +//! object_store = { version = "0.13", default-features = false, features = ["aws-base"] } |
| 604 | +//! ``` |
| 605 | +//! |
| 606 | +//! ```ignore |
| 607 | +//! use object_store::aws::AmazonS3Builder; |
| 608 | +//! |
| 609 | +//! let store = AmazonS3Builder::from_env() |
| 610 | +//! // `my_connector` is your own `impl HttpConnector` |
| 611 | +//! .with_http_connector(my_connector) |
| 612 | +//! .build()?; |
| 613 | +//! ``` |
| 614 | +//! |
| 615 | +//! See [Feature Flags](#feature-flags) above for the full set of flags. |
| 616 | +//! |
| 617 | +//! [`reqwest`]: https://crates.io/crates/reqwest |
539 | 618 |
|
540 | 619 | #[cfg(feature = "aws-base")] |
541 | 620 | pub mod aws; |
|
0 commit comments