# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. [package] categories = ["filesystem"] description = "Apache OpenDALâ„¢: Access data freely, painlessly, and efficiently." exclude = ["/tests/"] keywords = ["storage", "fs", "s3", "azblob", "gcs"] name = "opendal" authors = ["Apache OpenDAL "] edition = "2021" homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.75" version = "0.50.2" [lints.clippy] unused_async = "warn" [package.metadata.docs.rs] all-features = true [workspace] default-members = ["."] members = [".", "examples/*", "fuzz", "edge/*", "benches/vs_*"] [workspace.package] edition = "2021" license = "Apache-2.0" rust-version = "1.75" version = "0.50.1" [features] default = ["reqwest/rustls-tls", "executors-tokio", "services-memory"] # Build test utils or not. # # These features are used to control whether to build opendal's test utils. # And doesn't have any other effects. # # You should never enable this feature unless you are developing opendal. tests = [ "dep:rand", "dep:sha2", "dep:dotenvy", "layers-blocking", "services-azblob", "services-fs", "services-http", "services-memory", "internal-tokio-rt", "services-s3", ] # Enable path cache. # This is an internal feature, and should not be used by users. internal-path-cache = ["dep:moka"] # Enable tokio runtime. internal-tokio-rt = ["tokio/rt-multi-thread"] # Enable tokio executors support. executors-tokio = ["tokio/rt"] # Enable layers chaos support layers-chaos = ["dep:rand"] # Enable layers metrics support layers-metrics = ["dep:metrics"] # Enable layers mime_guess support layers-mime-guess = ["dep:mime_guess"] # Enable layers prometheus support, with tikv/prometheus-rs crate layers-prometheus = ["dep:prometheus"] # Enable layers prometheus support, with prometheus-client crate layers-prometheus-client = ["dep:prometheus-client"] # Enable layers fastrace support. layers-fastrace = ["dep:fastrace"] # Enable layers tracing support. layers-tracing = ["dep:tracing"] # Enable layers oteltrace support. layers-otel-trace = ["dep:opentelemetry"] # Enable layers throttle support. layers-throttle = ["dep:governor"] # Enable layers await-tree support. layers-await-tree = ["dep:await-tree"] # Enable layers async-backtrace support. layers-async-backtrace = ["dep:async-backtrace"] # Enable dtrace support. layers-blocking = ["internal-tokio-rt"] layers-dtrace = ["dep:probe"] services-aliyun-drive = [] services-alluxio = [] services-atomicserver = ["dep:atomic_lib"] services-azblob = [ "dep:sha2", "dep:reqsign", "reqsign?/services-azblob", "reqsign?/reqwest_request", ] services-azdls = [ "dep:reqsign", "reqsign?/services-azblob", "reqsign?/reqwest_request", ] services-azfile = [ "dep:reqsign", "reqsign?/services-azblob", "reqsign?/reqwest_request", ] services-b2 = [] services-cacache = ["dep:cacache"] services-chainsafe = [] services-cloudflare-kv = [] services-compfs = ["dep:compio"] services-cos = [ "dep:reqsign", "reqsign?/services-tencent", "reqsign?/reqwest_request", ] services-d1 = [] services-dashmap = ["dep:dashmap"] services-dbfs = [] services-dropbox = [] services-etcd = ["dep:etcd-client", "dep:bb8"] services-foundationdb = ["dep:foundationdb"] services-fs = ["tokio/fs", "internal-tokio-rt"] services-ftp = ["dep:suppaftp", "dep:bb8", "dep:async-tls"] services-gcs = [ "dep:reqsign", "reqsign?/services-google", "reqsign?/reqwest_request", ] services-gdrive = ["internal-path-cache"] services-ghac = [] services-github = [] services-gridfs = ["dep:mongodb"] services-hdfs = ["dep:hdrs"] services-hdfs-native = ["hdfs-native"] services-http = [] services-huggingface = [] services-icloud = ["internal-path-cache"] services-ipfs = ["dep:prost"] services-ipmfs = [] services-koofr = [] services-lakefs = [] services-libsql = ["dep:hrana-client-proto"] services-memcached = ["dep:bb8"] services-memory = [] services-mini-moka = ["dep:mini-moka"] services-moka = ["dep:moka"] services-mongodb = ["dep:mongodb"] services-monoiofs = ["dep:monoio", "dep:flume"] services-mysql = ["dep:sqlx", "sqlx?/mysql"] services-nebula-graph = ["dep:rust-nebula", "dep:bb8", "dep:snowflaked"] services-obs = [ "dep:reqsign", "reqsign?/services-huaweicloud", "reqsign?/reqwest_request", ] services-onedrive = [] services-oss = [ "dep:reqsign", "reqsign?/services-aliyun", "reqsign?/reqwest_request", ] services-pcloud = [] services-persy = ["dep:persy", "internal-tokio-rt"] services-postgresql = ["dep:sqlx", "sqlx?/postgres"] services-redb = ["dep:redb", "internal-tokio-rt"] services-redis = ["dep:redis", "dep:bb8", "redis?/tokio-rustls-comp"] services-redis-native-tls = ["services-redis", "redis?/tokio-native-tls-comp"] services-rocksdb = ["dep:rocksdb", "internal-tokio-rt"] services-s3 = [ "dep:reqsign", "reqsign?/services-aws", "reqsign?/reqwest_request", "dep:crc32c", ] services-seafile = [] services-sftp = ["dep:openssh", "dep:openssh-sftp-client", "dep:bb8"] services-sled = ["dep:sled", "internal-tokio-rt"] services-sqlite = ["dep:sqlx", "sqlx?/sqlite"] services-supabase = [] services-surrealdb = ["dep:surrealdb"] services-swift = [] services-tikv = ["tikv-client"] services-upyun = ["dep:hmac", "dep:sha1"] services-vercel-artifacts = [] services-vercel-blob = [] services-webdav = [] services-webhdfs = [] services-yandex-disk = [] [lib] bench = false [[bench]] harness = false name = "ops" required-features = ["tests"] [[bench]] harness = false name = "types" required-features = ["tests"] [[test]] harness = false name = "behavior" path = "tests/behavior/main.rs" required-features = ["tests"] [dependencies] async-tls = { version = "0.13.0", optional = true } # Required dependencies anyhow = { version = "1.0.30", features = ["std"] } async-trait = "0.1.68" backon = { version = "1.2", features = ["tokio-sleep"] } base64 = "0.22" bytes = "1.6" chrono = { version = "0.4.28", default-features = false, features = [ "clock", "std", ] } flagset = "0.4" futures = { version = "0.3", default-features = false, features = [ "std", "async-await", ] } http = "1.1" log = "0.4" md-5 = "0.10" # TODO: remove once_cell when lazy_lock is stable: https://doc.rust-lang.org/std/cell/struct.LazyCell.html once_cell = "1" percent-encoding = "2" quick-xml = { version = "0.36", features = ["serialize", "overlapped-lists"] } reqwest = { version = "0.12.2", features = [ "stream", ], default-features = false } serde = { version = "1", features = ["derive"] } serde_json = "1" tokio = { version = "1.27", features = ["sync", "io-util"] } uuid = { version = "1", features = ["serde", "v4"] } # Test only dependencies dotenvy = { version = "0.15", optional = true } rand = { version = "0.8", optional = true } # Optional dependencies # Services # general dependencies. bb8 = { version = "0.8", optional = true } prost = { version = "0.13", optional = true } sha1 = { version = "0.10.6", optional = true } sha2 = { version = "0.10", optional = true } sqlx = { version = "0.8.0", features = [ "runtime-tokio-rustls", ], optional = true } # For http based services. reqsign = { version = "0.16.1", default-features = false, optional = true } # for services-atomic-server atomic_lib = { version = "0.39.0", optional = true } # for services-cacache cacache = { version = "13.0", default-features = false, features = [ "tokio-runtime", "mmap", ], optional = true } # for services-dashmap dashmap = { version = "6", optional = true } # for services-etcd etcd-client = { version = "0.14", optional = true, features = ["tls"] } # for services-foundationdb foundationdb = { version = "0.9.0", features = [ "embedded-fdb-include", "fdb-7_3", ], optional = true } # for services-hdfs hdrs = { version = "0.3.2", optional = true, features = ["async_file"] } # for services-upyun hmac = { version = "0.12.1", optional = true } # for services-libsql hrana-client-proto = { version = "0.2.1", optional = true } # for services-mini-moka mini-moka = { version = "0.10", optional = true } # for services-moka moka = { version = "0.12", optional = true, features = ["future", "sync"] } # for services-mongodb mongodb = { version = "3", optional = true } # for services-sftp openssh = { version = "0.11.0", optional = true } openssh-sftp-client = { version = "0.15.0", optional = true, features = [ "openssh", "tracing", ] } # for services-persy persy = { version = "1.4.6", optional = true } # for services-redb redb = { version = "2", optional = true } # for services-redis redis = { version = "0.27", features = [ "cluster-async", "tokio-comp", "connection-manager", ], optional = true } # for services-rocksdb rocksdb = { version = "0.21.0", default-features = false, optional = true } # for services-sled sled = { version = "0.34.7", optional = true } # for services-ftp suppaftp = { version = "6.0.3", default-features = false, features = [ "async-secure", "rustls", "async-rustls", ], optional = true } # for services-tikv tikv-client = { version = "0.3.0", optional = true, default-features = false } # for services-hdfs-native hdfs-native = { version = "0.10", optional = true } # for services-surrealdb surrealdb = { version = "2", optional = true, features = ["protocol-http"] } # for services-compfs compio = { version = "0.12.0", optional = true, features = [ "runtime", "bytes", "polling", "dispatcher", ] } # for services-s3 crc32c = { version = "0.6.6", optional = true } # for services-nebula-graph rust-nebula = { version = "^0.0.2", optional = true, features = ["graph"] } snowflaked = { version = "1", optional = true, features = ["sync"] } # for services-monoiofs flume = { version = "0.11", optional = true } monoio = { version = "0.2.4", optional = true, features = [ "sync", "mkdirat", "unlinkat", "renameat", ] } # Layers # for layers-async-backtrace async-backtrace = { version = "0.2.6", optional = true } # for layers-await-tree await-tree = { version = "0.2", optional = true } # for layers-throttle governor = { version = "0.6.0", optional = true, features = ["std"] } # for layers-metrics metrics = { version = "0.24", optional = true } # for layers-mime-guess mime_guess = { version = "2.0.5", optional = true } # for layers-fastrace fastrace = { version = "0.7.1", optional = true } # for layers-opentelemetry opentelemetry = { version = "0.26", optional = true } # for layers-prometheus prometheus = { version = "0.13", features = ["process"], optional = true } # for layers-prometheus-client prometheus-client = { version = "0.22.2", optional = true } # for layers-tracing tracing = { version = "0.1", optional = true } # for layers-dtrace probe = { version = "0.5.1", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] backon = { version = "1.2", features = ["gloo-timers-sleep"] } getrandom = { version = "0.2", features = ["js"] } tokio = { version = "1.27", features = ["time"] } [dev-dependencies] criterion = { version = "0.5", features = ["async", "async_tokio"] } dotenvy = "0.15" fastrace = { version = "0.7", features = ["enable"] } fastrace-jaeger = "0.7" libtest-mimic = "0.8" opentelemetry = { version = "0.26", default-features = false, features = [ "trace", ] } opentelemetry-otlp = "0.26" opentelemetry_sdk = "0.26" pretty_assertions = "1" rand = "0.8" sha2 = "0.10" size = "0.4" tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] } tracing-opentelemetry = "0.27.0" tracing-subscriber = { version = "0.3", features = [ "env-filter", "tracing-log", ] }