Apache OpenDAL™ Core
opendal-core contains the storage abstraction, operator APIs, extension
traits, and shared infrastructure used by Apache OpenDAL™.
Most applications should depend on the opendal
facade. The facade re-exports the core APIs and wires optional service, layer,
executor, and HTTP transport crates behind feature flags.
Depend on opendal-core directly when implementing an OpenDAL service or layer,
building a minimal integration from the split crates, or managing service
registration and HTTP transport explicitly.
Quick start
The in-memory service is always available:
cargo add opendal-core
use services;
use Operator;
use Result;
Storage services and optional layers live in separate
opendal-service-* and opendal-layer-* crates. Applications using the facade
can enable them through services-* and layers-* features instead.
Compose split crates
Applications that depend on opendal-core directly compose storage and runtime
behavior explicitly:
- A service crate exports a builder that implements
opendal_core::Builder. Pass the configured builder toOperator::new. - A layer crate exports a type that implements
opendal_core::raw::Layer. Pass the configured layer toOperator::layer. - An HTTP transport crate exports an
opendal_core::HttpTransportimplementation. Wrap it inHttpTransporterand place it in the operator'sOperationContext.
For example, the following dependencies compose S3, retry, and the reqwest HTTP
transport without the opendal facade:
cargo add opendal-core opendal-service-s3 opendal-layer-retry
cargo add opendal-http-transport-reqwest
use HttpTransporter;
use OperationContext;
use Operator;
use Result;
use ReqwestTransport;
use RetryLayer;
use S3;
Configure builder for the target S3-compatible service before passing it to
build_operator.
Operator::new uses the builder directly and does not require service
registration. Call the service crate's register_*_service function with
OperatorRegistry::get() only when using scheme-driven construction through
Operator::from_uri or Operator::via_iter.
Documentation
License
Licensed under the Apache License, Version 2.0.