2 stable releases

1.0.1 Nov 7, 2024
1.0.0 Oct 23, 2024

#153 in Memory management

Download history 206/week @ 2024-10-21 4/week @ 2024-10-28 123/week @ 2024-11-04 8/week @ 2024-11-11

341 downloads per month

Apache-2.0

795KB
16K SLoC

Apache OpenDAL™ Compat integration

Build Status Latest Version Crate Downloads chat

opendal-compat provides compatibility functions for opendal.

This crate can make it easier to resolve the compatibility issues between different versions of opendal.

Examples

Add the following dependencies to your Cargo.toml with correct version:

[dependencies]
opendal_compat = { version = "1", features = ["v0_50_to_v0_49"] }
opendal = { version = "0.50.0" }
opendal_v0_49 = { package="opendal", version = "0.49" }

Convert opendal::Operator to old opendal Operator:

use opendal_v0_50::Operator;
use opendal_v0_50::services::MemoryConfig;
use opendal_v0_50::Result;

fn i_need_opendal_v0_49_op(op: opendal_v0_49::Operator) {
   // do something with old opendal;
}

fn main() -> Result<()> {
    let v0_50_op = Operator::from_config(MemoryConfig::default())?.finish();
    let v0_49_op = opendal_compat::v0_50_to_v0_49(v0_50_op);
    i_need_opendal_v0_49_op(v0_49_op);
    Ok(())
}

Branding

The first and most prominent mentions must use the full form: Apache OpenDAL™ of the name for any individual usage (webpage, handout, slides, etc.) Depending on the context and writing style, you should use the full form of the name sufficiently often to ensure that readers clearly understand the association of both the OpenDAL project and the OpenDAL software product to the ASF as the parent organization.

For more details, see the Apache Product Name Usage Guide.

License and Trademarks

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.

Dependencies

~0.2–12MB
~128K SLoC