This document covers OpenDAL's integrations with other Rust ecosystem crates and frameworks. These integrations allow OpenDAL to work seamlessly with existing tools and libraries by providing compatibility adapters and bridges.
For information about OpenDAL's own applications and tools built on top of the core library, see Applications and Tools. For details about language bindings that expose OpenDAL to other programming languages, see Language Bindings.
OpenDAL provides several integration packages that enable interoperability with popular Rust crates and frameworks. These integrations serve as adapter layers that translate between OpenDAL's internal APIs and the interfaces expected by external libraries.
Integration Architecture Overview
Sources: integrations/object_store/Cargo.toml1-62 integrations/parquet/Cargo.toml1-56
The object_store_opendal
crate is the primary integration that implements the widely-used object_store
trait for OpenDAL. This allows any application that expects an object_store::ObjectStore
implementation to use OpenDAL's 30+ storage services without modification.
The integration centers around the OpendalStore
struct that wraps an OpenDAL Operator
and implements the ObjectStore
trait:
OpendalStore Structure and Implementation
Sources: integrations/object_store/src/store.rs94-142 integrations/object_store/src/store.rs144-494
The integration includes comprehensive type conversion utilities to translate between OpenDAL and object_store types:
OpenDAL Type | object_store Type | Conversion Function |
---|---|---|
opendal::Error | object_store::Error | format_object_store_error() |
opendal::Metadata | object_store::ObjectMeta | format_object_meta() |
opendal::ErrorKind | object_store::Error variants | Pattern matching |
The error conversion handles all OpenDAL error kinds and maps them to appropriate object_store error types:
Error Mapping Between OpenDAL and object_store
Sources: integrations/object_store/src/utils.rs30-54 integrations/object_store/src/utils.rs56-65
The integration provides multipart upload capabilities through the OpendalMultipartUpload
struct, which leverages OpenDAL's concurrent writer functionality:
Multipart Upload Flow
Sources: integrations/object_store/src/store.rs496-583
The integration supports advanced conditional operations including:
if-match
, if-none-match
, if-modified-since
, if-unmodified-since
if-not-exists
, if-match
for updatesSources: integrations/object_store/src/store.rs220-324 integrations/object_store/src/store.rs146-189
For enhanced compatibility, the integration provides direct support for object_store's AmazonS3Builder
:
Amazon S3 Builder Integration Flow
Sources: integrations/object_store/src/amazon_s3.rs24-78
The integration enables seamless use with DataFusion for SQL queries over object storage:
Sources: integrations/object_store/examples/datafusion.rs10-52 integrations/object_store/README.md104-157
The integration includes optional send_wrapper
support for WebAssembly environments:
Sources: integrations/object_store/src/utils.rs23-28 integrations/object_store/src/utils.rs102-147 integrations/object_store/README.md160-167
The parquet_opendal
crate provides integration with the Parquet columnar storage format, enabling efficient reading and writing of Parquet files through OpenDAL's storage abstraction.
Parquet Integration Architecture
The integration focuses on async I/O operations optimized for cloud storage access patterns.
Sources: integrations/parquet/Cargo.toml18-48 integrations/parquet/examples/async_writer.rs1 integrations/parquet/examples/async_reader.rs1
All integrations include comprehensive behavior testing that validates compatibility across different storage services:
Integration Testing Architecture
Sources: integrations/object_store/tests/behavior/main.rs25-39 .github/workflows/test_behavior_integration_object_store.yml18-64 .github/scripts/test_behavior/test_plan.py63-72
The testing framework ensures that integrations work correctly across all supported storage services and maintain compatibility with their respective ecosystem libraries.
Auto-refresh not enabled yet