This is an automated email from the ASF dual-hosted git repository.
koushiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 8b3f2ee86 fix(core): add --workspace arg to clippy/test workflows of
core ci (#7050)
8b3f2ee86 is described below
commit 8b3f2ee86e97a50a6772961dc4354a9b069de206
Author: Qinxuan Chen <[email protected]>
AuthorDate: Thu Dec 18 21:50:08 2025 +0800
fix(core): add --workspace arg to clippy/test workflows of core ci (#7050)
* fix(core): add --workspace arg to core clippy/test ci
* fix services/layers
* apply some suggestions
* Cleanup some spaces
* remove browsers
* Fix seafile
* update lock
* Fix build on macos
* don't run fuzz test
* Fix clippy
* add license
* fix layers
* remove useless deps
* fix some services
---------
Co-authored-by: Xuanwo <[email protected]>
---
.github/workflows/ci_core.yml | 20 +++++++--
bindings/cpp/Cargo.toml | 2 +-
bindings/python/Cargo.toml | 2 +-
core/Cargo.lock | 73 +++++++++++++++++---------------
core/core/Cargo.toml | 18 ++------
core/fuzz/Cargo.toml | 2 +
core/layers/async-backtrace/Cargo.toml | 4 +-
core/layers/await-tree/Cargo.toml | 6 ++-
core/layers/capability-check/Cargo.toml | 3 +-
core/layers/chaos/Cargo.toml | 3 ++
core/layers/fastmetrics/Cargo.toml | 5 +++
core/layers/fastmetrics/src/lib.rs | 16 +++----
core/layers/fastrace/Cargo.toml | 4 ++
core/layers/immutable-index/Cargo.toml | 3 +-
core/layers/immutable-index/src/lib.rs | 4 --
core/layers/metrics/Cargo.toml | 3 ++
core/layers/metrics/src/lib.rs | 4 +-
core/layers/otelmetrics/Cargo.toml | 3 ++
core/layers/otelmetrics/src/lib.rs | 26 +++++-------
core/layers/prometheus-client/Cargo.toml | 5 +++
core/layers/prometheus/Cargo.toml | 5 +++
core/layers/prometheus/src/lib.rs | 4 +-
core/layers/throttle/Cargo.toml | 3 ++
core/layers/tracing/Cargo.toml | 19 ++++++++-
core/services/aliyun-drive/Cargo.toml | 6 +--
core/services/aliyun-drive/src/docs.md | 8 ++--
core/services/alluxio/Cargo.toml | 4 +-
core/services/alluxio/src/docs.md | 4 +-
core/services/azblob/Cargo.toml | 8 ++--
core/services/azblob/src/docs.md | 6 +--
core/services/azdls/Cargo.toml | 10 +++--
core/services/azdls/src/backend.rs | 2 +-
core/services/azdls/src/docs.md | 6 +--
core/services/azfile/Cargo.toml | 10 +++--
core/services/azfile/src/backend.rs | 2 +-
core/services/azfile/src/docs.md | 6 +--
core/services/azure-common/Cargo.toml | 5 +--
core/services/b2/Cargo.toml | 11 ++---
core/services/b2/src/docs.md | 4 +-
core/services/cacache/Cargo.toml | 1 -
core/services/cacache/src/docs.md | 4 +-
core/services/cloudflare-kv/Cargo.toml | 3 +-
core/services/compfs/Cargo.toml | 9 ++--
core/services/compfs/src/core.rs | 6 +--
core/services/cos/Cargo.toml | 19 +++------
core/services/cos/src/docs.md | 2 +-
core/services/d1/Cargo.toml | 5 +--
core/services/d1/src/docs.md | 2 +-
core/services/dbfs/src/docs.md | 6 +--
core/services/dropbox/Cargo.toml | 2 -
core/services/dropbox/src/docs.md | 7 ++-
core/services/etcd/Cargo.toml | 4 +-
core/services/etcd/src/docs.md | 4 +-
core/services/foundationdb/Cargo.toml | 3 --
core/services/foundationdb/build.rs | 51 ++++++++++++++++++++++
core/services/foundationdb/src/docs.md | 4 +-
core/services/fs/Cargo.toml | 7 ++-
core/services/ftp/Cargo.toml | 13 +++---
core/services/ftp/src/docs.md | 2 +-
core/services/gcs/Cargo.toml | 18 +++-----
core/services/gcs/src/docs.md | 10 ++---
core/services/ghac/Cargo.toml | 10 +++--
core/services/ghac/src/docs.md | 8 ++--
core/services/github/Cargo.toml | 5 +--
core/services/github/src/docs.md | 5 ++-
core/services/hdfs-native/Cargo.toml | 3 +-
core/services/http/Cargo.toml | 1 -
core/services/http/src/docs.md | 4 +-
core/services/huggingface/Cargo.toml | 7 ++-
core/services/huggingface/src/config.rs | 2 +-
core/services/huggingface/src/core.rs | 6 +--
core/services/huggingface/src/docs.md | 6 +--
core/services/huggingface/src/error.rs | 2 -
core/services/ipfs/Cargo.toml | 3 +-
core/services/ipfs/src/docs.md | 5 ++-
core/services/koofr/Cargo.toml | 6 ++-
core/services/koofr/src/config.rs | 2 +-
core/services/koofr/src/docs.md | 4 +-
core/services/moka/Cargo.toml | 6 ++-
core/services/moka/src/docs.md | 4 +-
core/services/mysql/Cargo.toml | 8 ++--
core/services/mysql/src/docs.md | 4 +-
core/services/obs/Cargo.toml | 8 ++--
core/services/obs/src/docs.md | 2 +-
core/services/onedrive/Cargo.toml | 17 ++------
core/services/onedrive/src/docs.md | 20 ++++-----
core/services/opfs/Cargo.toml | 5 +--
core/services/opfs/src/lib.rs | 2 +
core/services/oss/Cargo.toml | 15 +------
core/services/oss/src/docs.md | 6 +--
core/services/persy/Cargo.toml | 10 ++---
core/services/persy/src/docs.md | 4 +-
core/services/postgresql/Cargo.toml | 8 ++--
core/services/postgresql/src/docs.md | 4 +-
core/services/redb/Cargo.toml | 8 ++--
core/services/redb/src/docs.md | 4 +-
core/services/s3/Cargo.toml | 13 ++----
core/services/s3/src/docs.md | 36 ++++++++--------
core/services/seafile/Cargo.toml | 3 ++
core/services/seafile/src/docs.md | 4 +-
core/services/sled/Cargo.toml | 8 ++--
core/services/sled/src/docs.md | 4 +-
core/services/sqlite/Cargo.toml | 5 +--
core/services/sqlite/src/docs.md | 3 +-
core/services/surrealdb/Cargo.toml | 8 ++--
core/services/surrealdb/src/docs.md | 4 +-
core/services/swift/Cargo.toml | 11 +----
core/services/swift/src/docs.md | 8 ++--
core/services/tikv/Cargo.toml | 8 ++--
core/services/tikv/src/docs.md | 4 +-
core/services/vercel-blob/Cargo.toml | 3 +-
core/services/vercel-blob/src/docs.md | 2 +-
integrations/object_store/Cargo.toml | 2 +-
113 files changed, 440 insertions(+), 411 deletions(-)
diff --git a/.github/workflows/ci_core.yml b/.github/workflows/ci_core.yml
index 460449ee3..99262d0b7 100644
--- a/.github/workflows/ci_core.yml
+++ b/.github/workflows/ci_core.yml
@@ -75,7 +75,7 @@ jobs:
- name: Cargo clippy
working-directory: core
- run: cargo clippy --all-targets --all-features -- -D warnings
+ run: cargo clippy --workspace --all-targets --all-features -- -D
warnings
check_msrv:
runs-on: ubuntu-latest
@@ -244,6 +244,20 @@ jobs:
unit:
runs-on: ubuntu-latest
steps:
+ - name: cleanup
+ run: |
+ sudo rm -rf \
+ /usr/share/dotnet \
+ /usr/local/lib/android \
+ /opt/ghc \
+ /opt/hostedtoolcache/CodeQL \
+ /usr/local/share/chromium \
+ /opt/microsoft \
+ /opt/google \
+ /usr/lib/firefox
+
+ sudo docker image prune --all --force
+ sudo docker builder prune -a
- uses: actions/checkout@v5
- name: Checkout python env
uses: actions/setup-python@v6
@@ -267,8 +281,8 @@ jobs:
- name: Test
working-directory: core
run: |
- cargo nextest run --no-fail-fast --all-features
- cargo test --doc --all-features
+ cargo nextest run --workspace --no-fail-fast --all-features
+ cargo test --workspace --doc --all-features
env:
# Add rocksdb and java lib path to LD_LIBRARY_PATH
LD_LIBRARY_PATH: /tmp/rocksdb/lib:${{ env.JAVA_HOME
}}/lib/server:${{ env.LD_LIBRARY_PATH }}
diff --git a/bindings/cpp/Cargo.toml b/bindings/cpp/Cargo.toml
index 41c443734..bae1ae0f5 100644
--- a/bindings/cpp/Cargo.toml
+++ b/bindings/cpp/Cargo.toml
@@ -34,7 +34,7 @@ anyhow = { version = "1.0.100" }
cxx = { version = "1.0.186" }
cxx-async = { version = "0.1.3", optional = true }
futures = { version = "0.3.31" }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
# this crate won't be published, we always use the local version
opendal = { version = ">=0", path = "../../core", features = ["blocking"] }
tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] }
diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml
index 7d204be47..0db678105 100644
--- a/bindings/python/Cargo.toml
+++ b/bindings/python/Cargo.toml
@@ -201,7 +201,7 @@ bytes = "1.5.0"
dict_derive = "0.6.0"
futures = "0.3.28"
jiff = { version = "0.2.15" }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
# this crate won't be published, we always use the local version
opendal = { version = ">=0", path = "../../core", features = [
"blocking",
diff --git a/core/Cargo.lock b/core/Cargo.lock
index 2b3dfa295..ad4537756 100644
--- a/core/Cargo.lock
+++ b/core/Cargo.lock
@@ -5647,19 +5647,15 @@ dependencies = [
"backon",
"base64 0.22.1",
"bytes",
- "criterion",
"ctor",
- "divan",
"fastpool",
"flume",
"futures",
"getrandom 0.2.16",
- "hdfs-native",
"hdrs",
"http 1.4.0",
"http-body 1.0.1",
"jiff",
- "libtest-mimic",
"log",
"md-5",
"mea",
@@ -5672,7 +5668,6 @@ dependencies = [
"percent-encoding",
"pretty_assertions",
"probe",
- "prost 0.13.5",
"quick-xml",
"rand 0.8.5",
"redis",
@@ -5682,9 +5677,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
- "size",
"tokio",
- "tracing-opentelemetry",
"tracing-subscriber",
"url",
"uuid",
@@ -5765,23 +5758,28 @@ name = "opendal-layer-fastmetrics"
version = "0.55.0"
dependencies = [
"fastmetrics",
+ "log",
"opendal-core",
"opendal-layer-observe-metrics-common",
+ "tokio",
]
[[package]]
name = "opendal-layer-fastrace"
version = "0.55.0"
dependencies = [
+ "anyhow",
+ "dotenvy",
"fastrace",
+ "fastrace-jaeger",
"opendal-core",
+ "tokio",
]
[[package]]
name = "opendal-layer-immutable-index"
version = "0.55.0"
dependencies = [
- "anyhow",
"futures",
"log",
"opendal-core",
@@ -5838,18 +5836,22 @@ dependencies = [
name = "opendal-layer-prometheus"
version = "0.55.0"
dependencies = [
+ "log",
"opendal-core",
"opendal-layer-observe-metrics-common",
"prometheus 0.14.0",
+ "tokio",
]
[[package]]
name = "opendal-layer-prometheus-client"
version = "0.55.0"
dependencies = [
+ "log",
"opendal-core",
"opendal-layer-observe-metrics-common",
"prometheus-client",
+ "tokio",
]
[[package]]
@@ -5872,10 +5874,18 @@ dependencies = [
name = "opendal-layer-tracing"
version = "0.55.0"
dependencies = [
+ "anyhow",
+ "dotenvy",
"futures",
"http 1.4.0",
"opendal-core",
+ "opentelemetry",
+ "opentelemetry-otlp",
+ "opentelemetry_sdk",
+ "tokio",
"tracing",
+ "tracing-opentelemetry",
+ "tracing-subscriber",
]
[[package]]
@@ -5890,6 +5900,7 @@ dependencies = [
"opendal-core",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -5903,6 +5914,7 @@ dependencies = [
"opendal-core",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -5922,6 +5934,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
+ "tokio",
"uuid",
]
@@ -5939,6 +5952,7 @@ dependencies = [
"reqsign",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -5954,6 +5968,7 @@ dependencies = [
"quick-xml",
"reqsign",
"serde",
+ "tokio",
]
[[package]]
@@ -5987,7 +6002,6 @@ dependencies = [
"bytes",
"cacache",
"ctor",
- "log",
"opendal-core",
"serde",
"tokio",
@@ -6009,9 +6023,11 @@ dependencies = [
name = "opendal-service-compfs"
version = "0.55.0"
dependencies = [
+ "bytes",
"compio",
"ctor",
"opendal-core",
+ "rand 0.8.5",
"serde",
]
@@ -6019,20 +6035,16 @@ dependencies = [
name = "opendal-service-cos"
version = "0.55.0"
dependencies = [
- "base64 0.22.1",
"bytes",
"ctor",
"http 1.4.0",
"log",
"opendal-core",
- "pretty_assertions",
"quick-xml",
"reqsign",
"reqwest",
"serde",
- "serde_json",
"tokio",
- "tracing-subscriber",
]
[[package]]
@@ -6042,9 +6054,7 @@ dependencies = [
"bytes",
"ctor",
"http 1.4.0",
- "log",
"opendal-core",
- "pretty_assertions",
"serde",
"serde_json",
"tokio",
@@ -6084,7 +6094,6 @@ dependencies = [
"bytes",
"ctor",
"http 1.4.0",
- "log",
"mea",
"opendal-core",
"serde",
@@ -6096,11 +6105,9 @@ dependencies = [
name = "opendal-service-etcd"
version = "0.55.0"
dependencies = [
- "bytes",
"ctor",
"etcd-client",
"fastpool",
- "log",
"opendal-core",
"serde",
"tokio",
@@ -6110,10 +6117,8 @@ dependencies = [
name = "opendal-service-foundationdb"
version = "0.55.0"
dependencies = [
- "bytes",
"ctor",
"foundationdb",
- "log",
"opendal-core",
"serde",
"tokio",
@@ -6154,21 +6159,18 @@ name = "opendal-service-gcs"
version = "0.55.0"
dependencies = [
"backon",
- "base64 0.22.1",
"bytes",
"ctor",
"http 1.4.0",
"log",
"opendal-core",
"percent-encoding",
- "pretty_assertions",
"quick-xml",
"reqsign",
"reqwest",
"serde",
"serde_json",
"tokio",
- "tracing-subscriber",
]
[[package]]
@@ -6187,6 +6189,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
+ "tokio",
]
[[package]]
@@ -6221,7 +6224,6 @@ dependencies = [
name = "opendal-service-http"
version = "0.55.0"
dependencies = [
- "anyhow",
"ctor",
"http 1.4.0",
"log",
@@ -6236,12 +6238,14 @@ version = "0.55.0"
dependencies = [
"bytes",
"ctor",
+ "futures",
"http 1.4.0",
"log",
"opendal-core",
"percent-encoding",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -6270,6 +6274,7 @@ dependencies = [
"opendal-core",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -6304,6 +6309,7 @@ dependencies = [
"moka",
"opendal-core",
"serde",
+ "tokio",
]
[[package]]
@@ -6315,6 +6321,7 @@ dependencies = [
"opendal-core",
"serde",
"sqlx",
+ "tokio",
]
[[package]]
@@ -6329,25 +6336,22 @@ dependencies = [
"quick-xml",
"reqsign",
"serde",
+ "tokio",
]
[[package]]
name = "opendal-service-onedrive"
version = "0.55.0"
dependencies = [
- "anyhow",
"bytes",
"ctor",
"http 1.4.0",
"log",
"mea",
"opendal-core",
- "pretty_assertions",
- "reqwest",
"serde",
"serde_json",
"tokio",
- "tracing-subscriber",
]
[[package]]
@@ -6367,7 +6371,6 @@ dependencies = [
name = "opendal-service-oss"
version = "0.55.0"
dependencies = [
- "anyhow",
"bytes",
"ctor",
"http 1.4.0",
@@ -6376,11 +6379,8 @@ dependencies = [
"pretty_assertions",
"quick-xml",
"reqsign",
- "reqwest",
"serde",
- "serde_json",
"tokio",
- "tracing-subscriber",
]
[[package]]
@@ -6405,6 +6405,7 @@ dependencies = [
"opendal-core",
"persy",
"serde",
+ "tokio",
]
[[package]]
@@ -6416,6 +6417,7 @@ dependencies = [
"opendal-core",
"serde",
"sqlx",
+ "tokio",
]
[[package]]
@@ -6426,6 +6428,7 @@ dependencies = [
"opendal-core",
"redb",
"serde",
+ "tokio",
]
[[package]]
@@ -6465,6 +6468,7 @@ dependencies = [
"opendal-core",
"serde",
"serde_json",
+ "tokio",
]
[[package]]
@@ -6475,6 +6479,7 @@ dependencies = [
"opendal-core",
"serde",
"sled",
+ "tokio",
]
[[package]]
@@ -6498,19 +6503,18 @@ dependencies = [
"opendal-core",
"serde",
"surrealdb",
+ "tokio",
]
[[package]]
name = "opendal-service-swift"
version = "0.55.0"
dependencies = [
- "anyhow",
"bytes",
"ctor",
"http 1.4.0",
"log",
"opendal-core",
- "pretty_assertions",
"quick-xml",
"serde",
"serde_json",
@@ -6526,6 +6530,7 @@ dependencies = [
"opendal-core",
"serde",
"tikv-client",
+ "tokio",
]
[[package]]
diff --git a/core/core/Cargo.toml b/core/core/Cargo.toml
index b4be18ad8..31e694217 100644
--- a/core/core/Cargo.toml
+++ b/core/core/Cargo.toml
@@ -85,16 +85,13 @@ backon = { version = "1.6", features = ["tokio-sleep"] }
base64 = { workspace = true }
bytes = { workspace = true }
ctor = { workspace = true }
-futures = { workspace = true, default-features = false, features = [
- "std",
- "async-await",
-] }
+futures = { workspace = true, features = ["std", "async-await"] }
http = { workspace = true }
http-body = "1"
jiff = { version = "0.2.15", features = ["serde"] }
log = { workspace = true }
md-5 = "0.10"
-mea = { version = "0.5.1" }
+mea = "0.5.1"
percent-encoding = "2"
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
reqwest = { version = "0.12.24", features = [
@@ -111,12 +108,10 @@ uuid = { workspace = true, features = ["serde", "v4"] }
# Services
# general dependencies.
fastpool = { version = "1.0.2", optional = true }
-prost = { version = "0.13", optional = true }
sha2 = { workspace = true, optional = true }
# For http based services.
-reqsign = { workspace = true, default-features = false, optional = true }
-
+reqsign = { workspace = true, features = ["reqwest_request"], optional = true }
# for services-hdfs
hdrs = { version = "0.3.2", optional = true, features = ["async_file"] }
# for services-moka
@@ -138,8 +133,6 @@ redis = { version = "1.0", features = [
], optional = true }
# for services-rocksdb
rocksdb = { version = "0.21.0", default-features = false, optional = true }
-# for services-hdfs-native
-hdfs-native = { version = "0.13", optional = true }
# for services-monoiofs
flume = { version = "0.11", optional = true }
monoio = { version = "0.2.4", optional = true, features = [
@@ -162,15 +155,10 @@ uuid = { workspace = true, features = ["serde", "v4",
"js"] }
web-time = { version = "1.1.0" }
[dev-dependencies]
-criterion = { version = "0.7", features = ["async", "async_tokio"] }
-divan = { version = "0.1" }
-libtest-mimic = "0.8"
pretty_assertions = "1"
rand = { workspace = true }
sha2 = { workspace = true }
-size = "0.5"
tokio = { workspace = true, features = ["fs", "macros", "rt-multi-thread"] }
-tracing-opentelemetry = "0.32.0"
tracing-subscriber = { version = "0.3", features = [
"env-filter",
"tracing-log",
diff --git a/core/fuzz/Cargo.toml b/core/fuzz/Cargo.toml
index 1043d1677..fd353dcd8 100644
--- a/core/fuzz/Cargo.toml
+++ b/core/fuzz/Cargo.toml
@@ -90,7 +90,9 @@ uuid = { workspace = true, features = ["v4"] }
[[bin]]
name = "fuzz_reader"
path = "fuzz_reader.rs"
+test = false
[[bin]]
name = "fuzz_writer"
path = "fuzz_writer.rs"
+test = false
diff --git a/core/layers/async-backtrace/Cargo.toml
b/core/layers/async-backtrace/Cargo.toml
index ba6499a30..75be18e89 100644
--- a/core/layers/async-backtrace/Cargo.toml
+++ b/core/layers/async-backtrace/Cargo.toml
@@ -31,6 +31,8 @@ version = { workspace = true }
all-features = true
[dependencies]
+async-backtrace = "0.2.6"
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-async-backtrace = "0.2.6"
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/await-tree/Cargo.toml
b/core/layers/await-tree/Cargo.toml
index d062d7ebe..36c91913b 100644
--- a/core/layers/await-tree/Cargo.toml
+++ b/core/layers/await-tree/Cargo.toml
@@ -31,7 +31,9 @@ version = { workspace = true }
all-features = true
[dependencies]
+await-tree = "0.3"
+futures = { workspace = true }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-await-tree = "0.3"
-futures = { workspace = true, default-features = true }
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/capability-check/Cargo.toml
b/core/layers/capability-check/Cargo.toml
index 933937c18..285f48c44 100644
--- a/core/layers/capability-check/Cargo.toml
+++ b/core/layers/capability-check/Cargo.toml
@@ -34,4 +34,5 @@ all-features = true
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
[dev-dependencies]
-tokio = { workspace = true, features = ["macros", "rt"] }
+opendal-core = { path = "../../core", version = "0.55.0" }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/chaos/Cargo.toml b/core/layers/chaos/Cargo.toml
index 493ddb3d5..1069b8456 100644
--- a/core/layers/chaos/Cargo.toml
+++ b/core/layers/chaos/Cargo.toml
@@ -33,3 +33,6 @@ all-features = true
[dependencies]
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
rand = { workspace = true }
+
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/fastmetrics/Cargo.toml
b/core/layers/fastmetrics/Cargo.toml
index c60193292..fc9b43fc1 100644
--- a/core/layers/fastmetrics/Cargo.toml
+++ b/core/layers/fastmetrics/Cargo.toml
@@ -34,3 +34,8 @@ all-features = true
fastmetrics = { version = "0.4.1" }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
opendal-layer-observe-metrics-common = { path = "../observe-metrics-common",
version = "0.55.0", default-features = false }
+
+[dev-dependencies]
+log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0" }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/fastmetrics/src/lib.rs
b/core/layers/fastmetrics/src/lib.rs
index d6b03f774..bf39d055b 100644
--- a/core/layers/fastmetrics/src/lib.rs
+++ b/core/layers/fastmetrics/src/lib.rs
@@ -41,11 +41,11 @@ use opendal_layer_observe_metrics_common as observe;
/// ```no_run
/// # use fastmetrics::format::text;
/// # use log::info;
-/// # use opendal_layer_fastmetrics::FastmetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
-///
+/// # use opendal_layer_fastmetrics::FastmetricsLayer;
+/// #
/// # #[tokio::main]
/// # async fn main() -> Result<()> {
/// let mut registry = fastmetrics::registry::Registry::default();
@@ -83,14 +83,15 @@ use opendal_layer_observe_metrics_common as observe;
///
/// ```no_run
/// # use std::sync::OnceLock;
+/// #
/// # use fastmetrics::format::text;
/// # use fastmetrics::registry::with_global_registry;
/// # use log::info;
-/// # use opendal_layer_fastmetrics::FastmetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
-///
+/// # use opendal_layer_fastmetrics::FastmetricsLayer;
+/// #
/// fn global_fastmetrics_layer() -> &'static FastmetricsLayer {
/// static GLOBAL: OnceLock<FastmetricsLayer> = OnceLock::new();
/// GLOBAL.get_or_init(|| {
@@ -229,13 +230,12 @@ impl FastmetricsLayerBuilder {
/// # Example
///
/// ```no_run
- /// # use opendal_layer_fastmetrics::FastmetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
- ///
- /// # #[tokio::main]
- /// # async fn main() -> Result<()> {
+ /// # use opendal_layer_fastmetrics::FastmetricsLayer;
+ /// #
+ /// # fn main() -> Result<()> {
/// let mut registry = fastmetrics::registry::Registry::default();
///
/// // Pick a builder and configure it.
diff --git a/core/layers/fastrace/Cargo.toml b/core/layers/fastrace/Cargo.toml
index 96169e630..28a0ebd1e 100644
--- a/core/layers/fastrace/Cargo.toml
+++ b/core/layers/fastrace/Cargo.toml
@@ -35,5 +35,9 @@ fastrace = "0.7.14"
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
[dev-dependencies]
+anyhow = "1.0"
+dotenvy = "0.15"
fastrace = { version = "0.7", features = ["enable"] }
+fastrace-jaeger = "0.7"
opendal-core = { path = "../../core", version = "0.55.0" }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/immutable-index/Cargo.toml
b/core/layers/immutable-index/Cargo.toml
index fbc5cc7dc..c3067d369 100644
--- a/core/layers/immutable-index/Cargo.toml
+++ b/core/layers/immutable-index/Cargo.toml
@@ -34,8 +34,7 @@ all-features = true
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
[dev-dependencies]
-anyhow = { version = "1.0.100", features = ["std"] }
-futures = { workspace = true, default-features = true }
+futures = { workspace = true }
log = { workspace = true }
opendal-core = { path = "../../core", version = "0.55.0" }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/immutable-index/src/lib.rs
b/core/layers/immutable-index/src/lib.rs
index e43f27e83..82edc5013 100644
--- a/core/layers/immutable-index/src/lib.rs
+++ b/core/layers/immutable-index/src/lib.rs
@@ -215,12 +215,8 @@ mod tests {
use std::collections::HashMap;
use std::sync::Arc;
- use anyhow::Result;
use futures::TryStreamExt;
use log::debug;
- use opendal_core::EntryMode;
- use opendal_core::Operator;
- use opendal_core::raw::*;
use super::*;
diff --git a/core/layers/metrics/Cargo.toml b/core/layers/metrics/Cargo.toml
index 8461ebff6..696fc5b8e 100644
--- a/core/layers/metrics/Cargo.toml
+++ b/core/layers/metrics/Cargo.toml
@@ -34,3 +34,6 @@ all-features = true
metrics = "0.24"
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
opendal-layer-observe-metrics-common = { path = "../observe-metrics-common",
version = "0.55.0", default-features = false }
+
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/metrics/src/lib.rs b/core/layers/metrics/src/lib.rs
index 2d098d5f5..5c12b7b17 100644
--- a/core/layers/metrics/src/lib.rs
+++ b/core/layers/metrics/src/lib.rs
@@ -37,11 +37,11 @@ use opendal_layer_observe_metrics_common as observe;
/// # Examples
///
/// ```no_run
-/// # use opendal_layer_metrics::MetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
-///
+/// # use opendal_layer_metrics::MetricsLayer;
+/// #
/// # fn main() -> Result<()> {
/// let _ = Operator::new(services::Memory::default())?
/// .layer(MetricsLayer::default())
diff --git a/core/layers/otelmetrics/Cargo.toml
b/core/layers/otelmetrics/Cargo.toml
index 88f5bb513..4a07fbbb8 100644
--- a/core/layers/otelmetrics/Cargo.toml
+++ b/core/layers/otelmetrics/Cargo.toml
@@ -36,3 +36,6 @@ opendal-layer-observe-metrics-common = { path =
"../observe-metrics-common", ver
opentelemetry = { version = "0.31.0", default-features = false, features = [
"metrics",
] }
+
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/otelmetrics/src/lib.rs
b/core/layers/otelmetrics/src/lib.rs
index 5b084a59c..b52602631 100644
--- a/core/layers/otelmetrics/src/lib.rs
+++ b/core/layers/otelmetrics/src/lib.rs
@@ -28,17 +28,17 @@ use opentelemetry::metrics::UpDownCounter;
/// # Examples
///
/// ```no_run
-/// # use opendal_layer_otelmetrics::OtelMetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
-///
+/// # use opendal_layer_otelmetrics::OtelMetricsLayer;
+/// #
/// # fn main() -> Result<()> {
/// let meter = opentelemetry::global::meter("opendal");
/// let _ = Operator::new(services::Memory::default())?
/// .layer(OtelMetricsLayer::builder().register(&meter))
/// .finish();
-/// Ok(())
+/// # Ok(())
/// # }
/// ```
#[derive(Clone, Debug)]
@@ -52,19 +52,17 @@ impl OtelMetricsLayer {
/// # Examples
///
/// ```no_run
- /// # use opendal_layer_otelmetrics::OtelMetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
- ///
- /// # #[tokio::main]
- /// # async fn main() -> Result<()> {
+ /// # use opendal_layer_otelmetrics::OtelMetricsLayer;
+ /// #
+ /// # fn main() -> Result<()> {
/// let meter = opentelemetry::global::meter("opendal");
/// let op = Operator::new(services::Memory::default())?
/// .layer(OtelMetricsLayer::builder().register(&meter))
/// .finish();
- ///
- /// Ok(())
+ /// # Ok(())
/// # }
/// ```
pub fn builder() -> OtelMetricsLayerBuilder {
@@ -149,19 +147,17 @@ impl OtelMetricsLayerBuilder {
/// # Examples
///
/// ```no_run
- /// # use opendal_layer_otelmetrics::OtelMetricsLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
- ///
- /// # #[tokio::main]
- /// # async fn main() -> Result<()> {
+ /// # use opendal_layer_otelmetrics::OtelMetricsLayer;
+ /// #
+ /// # fn main() -> Result<()> {
/// let meter = opentelemetry::global::meter("opendal");
/// let op = Operator::new(services::Memory::default())?
/// .layer(OtelMetricsLayer::builder().register(&meter))
/// .finish();
- ///
- /// Ok(())
+ /// # Ok(())
/// # }
/// ```
pub fn register(self, meter: &Meter) -> OtelMetricsLayer {
diff --git a/core/layers/prometheus-client/Cargo.toml
b/core/layers/prometheus-client/Cargo.toml
index 2fe48a82a..e52043a5e 100644
--- a/core/layers/prometheus-client/Cargo.toml
+++ b/core/layers/prometheus-client/Cargo.toml
@@ -34,3 +34,8 @@ all-features = true
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
opendal-layer-observe-metrics-common = { path = "../observe-metrics-common",
version = "0.55.0", default-features = false }
prometheus-client = { version = "0.24" }
+
+[dev-dependencies]
+log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0" }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/prometheus/Cargo.toml
b/core/layers/prometheus/Cargo.toml
index 45f588a22..28ff38674 100644
--- a/core/layers/prometheus/Cargo.toml
+++ b/core/layers/prometheus/Cargo.toml
@@ -34,3 +34,8 @@ all-features = true
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
opendal-layer-observe-metrics-common = { path = "../observe-metrics-common",
version = "0.55.0", default-features = false }
prometheus = { version = "0.14", features = ["process"] }
+
+[dev-dependencies]
+log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0" }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/layers/prometheus/src/lib.rs
b/core/layers/prometheus/src/lib.rs
index 003e3d5ed..b1c6fe027 100644
--- a/core/layers/prometheus/src/lib.rs
+++ b/core/layers/prometheus/src/lib.rs
@@ -42,12 +42,12 @@ use prometheus::register_int_gauge_vec_with_registry;
///
/// ```no_run
/// # use log::info;
-/// # use opendal_layer_prometheus::PrometheusLayer;
/// # use opendal_core::services;
/// # use opendal_core::Operator;
/// # use opendal_core::Result;
/// # use prometheus::Encoder;
-///
+/// # use opendal_layer_prometheus::PrometheusLayer;
+/// #
/// # #[tokio::main]
/// # async fn main() -> Result<()> {
/// let registry = prometheus::default_registry();
diff --git a/core/layers/throttle/Cargo.toml b/core/layers/throttle/Cargo.toml
index e4000c4c9..89e322184 100644
--- a/core/layers/throttle/Cargo.toml
+++ b/core/layers/throttle/Cargo.toml
@@ -33,3 +33,6 @@ all-features = true
[dependencies]
governor = { version = "0.10.1", features = ["std"] }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+
+[dev-dependencies]
+opendal-core = { path = "../../core", version = "0.55.0" }
diff --git a/core/layers/tracing/Cargo.toml b/core/layers/tracing/Cargo.toml
index b8f9b7383..2c4405731 100644
--- a/core/layers/tracing/Cargo.toml
+++ b/core/layers/tracing/Cargo.toml
@@ -31,8 +31,23 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
futures = { workspace = true }
http = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
tracing = "0.1"
+
+[dev-dependencies]
+anyhow = "1.0"
+dotenvy = "0.15"
+opendal-core = { path = "../../core", version = "0.55.0" }
+opentelemetry = { version = "0.31.0", default-features = false, features = [
+ "trace",
+] }
+opentelemetry-otlp = { version = "0.31.0", features = ["grpc-tonic"] }
+opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio"] }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
+tracing-opentelemetry = "0.32.0"
+tracing-subscriber = { version = "0.3", features = [
+ "env-filter",
+ "tracing-log",
+] }
diff --git a/core/services/aliyun-drive/Cargo.toml
b/core/services/aliyun-drive/Cargo.toml
index af711d04c..30d3a5790 100644
--- a/core/services/aliyun-drive/Cargo.toml
+++ b/core/services/aliyun-drive/Cargo.toml
@@ -31,14 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/aliyun-drive/src/docs.md
b/core/services/aliyun-drive/src/docs.md
index 9c21bb7ee..0ecbfb74e 100644
--- a/core/services/aliyun-drive/src/docs.md
+++ b/core/services/aliyun-drive/src/docs.md
@@ -21,18 +21,16 @@ This service can be used to:
- `refresh_token`: Set the refresh_token for backend.
- `drive_type`: Set the drive_type for backend.
-Refer to [`AliyunDriveBuilder`]`s public API docs for more information.
+Refer to [`AliyunDriveBuilder`]'s public API docs for more information.
## Example
### Basic Setup
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_service_aliyun_drive::AliyunDrive;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_aliyun_drive::AliyunDrive;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/alluxio/Cargo.toml b/core/services/alluxio/Cargo.toml
index fce1c11d0..323f4a128 100644
--- a/core/services/alluxio/Cargo.toml
+++ b/core/services/alluxio/Cargo.toml
@@ -31,13 +31,13 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/alluxio/src/docs.md
b/core/services/alluxio/src/docs.md
index 3d12b94e7..7afe4e559 100644
--- a/core/services/alluxio/src/docs.md
+++ b/core/services/alluxio/src/docs.md
@@ -24,9 +24,9 @@ You can refer to [`AlluxioBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_alluxio::Alluxio;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_alluxio::Alluxio;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/azblob/Cargo.toml b/core/services/azblob/Cargo.toml
index a33c606bb..0f617e2eb 100644
--- a/core/services/azblob/Cargo.toml
+++ b/core/services/azblob/Cargo.toml
@@ -31,16 +31,15 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
-
base64 = { workspace = true }
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
-reqsign = { workspace = true, default-features = false, features = [
+reqsign = { workspace = true, features = [
"reqwest_request",
"services-azblob",
] }
@@ -51,3 +50,4 @@ uuid = { workspace = true, features = ["v4", "serde"] }
[dev-dependencies]
pretty_assertions = "1"
serde_json = { workspace = true }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/azblob/src/docs.md b/core/services/azblob/src/docs.md
index 2d8bdbead..bfd5ace27 100644
--- a/core/services/azblob/src/docs.md
+++ b/core/services/azblob/src/docs.md
@@ -38,11 +38,9 @@ az storage container create --name test --connection-string
"DefaultEndpointsPro
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Azblob;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_azblob::Azblob;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/azdls/Cargo.toml b/core/services/azdls/Cargo.toml
index e0c6e3226..222f0dd85 100644
--- a/core/services/azdls/Cargo.toml
+++ b/core/services/azdls/Cargo.toml
@@ -31,17 +31,19 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
-reqsign = { workspace = true, default-features = false, features = [
+reqsign = { workspace = true, features = [
"reqwest_request",
"services-azblob",
] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/azdls/src/backend.rs
b/core/services/azdls/src/backend.rs
index 40b7072b2..19ef30188 100644
--- a/core/services/azdls/src/backend.rs
+++ b/core/services/azdls/src/backend.rs
@@ -199,7 +199,7 @@ impl AzdlsBuilder {
/// # Example
/// ```
/// use opendal_core::Builder;
- /// use opendal_core::services::Azdls;
+ /// use opendal_service_azdls::Azdls;
///
/// let conn_str =
"AccountName=example;DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net";
///
diff --git a/core/services/azdls/src/docs.md b/core/services/azdls/src/docs.md
index a91c78f86..00f734c3f 100644
--- a/core/services/azdls/src/docs.md
+++ b/core/services/azdls/src/docs.md
@@ -35,11 +35,9 @@ Refer to public API docs for more information.
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Azdls;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_azdls::Azdls;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/azfile/Cargo.toml b/core/services/azfile/Cargo.toml
index 85fe442ea..45e67b993 100644
--- a/core/services/azfile/Cargo.toml
+++ b/core/services/azfile/Cargo.toml
@@ -31,16 +31,18 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+opendal-service-azure-common = { path = "../azure-common", version = "0.55.0" }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
-reqsign = { workspace = true, default-features = false, features = [
+reqsign = { workspace = true, features = [
"reqwest_request",
"services-azblob",
] }
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/azfile/src/backend.rs
b/core/services/azfile/src/backend.rs
index cbb514b55..47a0394b2 100644
--- a/core/services/azfile/src/backend.rs
+++ b/core/services/azfile/src/backend.rs
@@ -135,7 +135,7 @@ impl AzfileBuilder {
/// # Example
/// ```
/// use opendal_core::Builder;
- /// use opendal_core::services::Azfile;
+ /// use opendal_service_azfile::Azfile;
///
/// let conn_str =
"AccountName=example;DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net";
///
diff --git a/core/services/azfile/src/docs.md b/core/services/azfile/src/docs.md
index dcce22daf..3f769df38 100644
--- a/core/services/azfile/src/docs.md
+++ b/core/services/azfile/src/docs.md
@@ -27,11 +27,9 @@ Refer to public API docs for more information.
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Azfile;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_azfile::Azfile;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/azure-common/Cargo.toml
b/core/services/azure-common/Cargo.toml
index 79382610e..0f989c108 100644
--- a/core/services/azure-common/Cargo.toml
+++ b/core/services/azure-common/Cargo.toml
@@ -31,7 +31,6 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
http = { workspace = true }
-reqsign = { workspace = true, default-features = false }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+reqsign = { workspace = true }
diff --git a/core/services/b2/Cargo.toml b/core/services/b2/Cargo.toml
index 74c84ddee..68b552b80 100644
--- a/core/services/b2/Cargo.toml
+++ b/core/services/b2/Cargo.toml
@@ -31,19 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[dev-dependencies]
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/b2/src/docs.md b/core/services/b2/src/docs.md
index a72cfd757..8c607b394 100644
--- a/core/services/b2/src/docs.md
+++ b/core/services/b2/src/docs.md
@@ -27,9 +27,9 @@ You can refer to [`B2Builder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::B2;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_b2::B2;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/cacache/Cargo.toml b/core/services/cacache/Cargo.toml
index 1647e5c4d..3f3f0bbd1 100644
--- a/core/services/cacache/Cargo.toml
+++ b/core/services/cacache/Cargo.toml
@@ -37,7 +37,6 @@ cacache = { version = "13.0", default-features = false,
features = [
"mmap",
] }
ctor = { workspace = true }
-log = { workspace = true }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
diff --git a/core/services/cacache/src/docs.md
b/core/services/cacache/src/docs.md
index f4664dc51..523655c16 100644
--- a/core/services/cacache/src/docs.md
+++ b/core/services/cacache/src/docs.md
@@ -23,9 +23,9 @@ You can refer to [`CacacheBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_cacache::Cacache;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_cacache::Cacache;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/cloudflare-kv/Cargo.toml
b/core/services/cloudflare-kv/Cargo.toml
index 4e1a9b5aa..0d8999e99 100644
--- a/core/services/cloudflare-kv/Cargo.toml
+++ b/core/services/cloudflare-kv/Cargo.toml
@@ -31,10 +31,9 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
diff --git a/core/services/compfs/Cargo.toml b/core/services/compfs/Cargo.toml
index 0de5a3c23..44992f821 100644
--- a/core/services/compfs/Cargo.toml
+++ b/core/services/compfs/Cargo.toml
@@ -31,10 +31,6 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
- "internal-tokio-rt",
-] }
-
compio = { version = "0.16.0", features = [
"runtime",
"bytes",
@@ -42,4 +38,9 @@ compio = { version = "0.16.0", features = [
"dispatcher",
] }
ctor = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+bytes = { workspace = true }
+rand = { workspace = true }
diff --git a/core/services/compfs/src/core.rs b/core/services/compfs/src/core.rs
index 4ec94fc68..71981f045 100644
--- a/core/services/compfs/src/core.rs
+++ b/core/services/compfs/src/core.rs
@@ -112,7 +112,7 @@ mod tests {
use super::*;
- fn setup_buffer() -> (Buffer, usize, Bytes) {
+ fn setup_buffer() -> (CompfsBuffer, usize, Bytes) {
let mut rng = thread_rng();
let bs = (0..100)
@@ -128,7 +128,7 @@ mod tests {
let total_content = bs.iter().flatten().copied().collect::<Bytes>();
let buf = Buffer::from(bs);
- (buf, total_size, total_content)
+ (CompfsBuffer(buf), total_size, total_content)
}
#[test]
@@ -136,6 +136,6 @@ mod tests {
let (buf, _len, _bytes) = setup_buffer();
let slice = IoBuf::as_slice(&buf);
- assert_eq!(slice, buf.current().chunk())
+ assert_eq!(slice, buf.0.current().chunk())
}
}
diff --git a/core/services/cos/Cargo.toml b/core/services/cos/Cargo.toml
index 8de5384d9..62b5eeb7d 100644
--- a/core/services/cos/Cargo.toml
+++ b/core/services/cos/Cargo.toml
@@ -31,29 +31,20 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
-base64 = { workspace = true }
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
-reqsign = { workspace = true, default-features = false, features = [
+reqsign = { workspace = true, features = [
"services-tencent",
"reqwest_request",
] }
-reqwest = { version = "0.12.24", features = [
+reqwest = { version = "0.12.24", default-features = false, features = [
"stream",
-], default-features = false }
+] }
serde = { workspace = true, features = ["derive"] }
[dev-dependencies]
-pretty_assertions = "1"
-serde_json = { workspace = true }
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
-tracing-subscriber = "0.3"
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/cos/src/docs.md b/core/services/cos/src/docs.md
index c1260a78b..1b8086c64 100644
--- a/core/services/cos/src/docs.md
+++ b/core/services/cos/src/docs.md
@@ -27,9 +27,9 @@ You can refer to [`CosBuilder`]'s docs for more information
### Via Builder
```rust,no_run
+use opendal_core::Operator;
use opendal_core::Result;
use opendal_service_cos::Cos;
-use opendal_core::Operator;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/d1/Cargo.toml b/core/services/d1/Cargo.toml
index 9ea4c9e4c..27d80cdac 100644
--- a/core/services/d1/Cargo.toml
+++ b/core/services/d1/Cargo.toml
@@ -31,15 +31,12 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
-log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[dev-dependencies]
-pretty_assertions = "1"
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/d1/src/docs.md b/core/services/d1/src/docs.md
index 92bb122bf..84aa8a1bf 100644
--- a/core/services/d1/src/docs.md
+++ b/core/services/d1/src/docs.md
@@ -27,8 +27,8 @@ This service can be used to:
### Via Builder
```rust,no_run
-use opendal_service_d1::D1;
use opendal_core::Operator;
+use opendal_service_d1::D1;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
diff --git a/core/services/dbfs/src/docs.md b/core/services/dbfs/src/docs.md
index da66f0893..dfbd06fdb 100644
--- a/core/services/dbfs/src/docs.md
+++ b/core/services/dbfs/src/docs.md
@@ -27,11 +27,9 @@ Refer to [`DbfsBuilder`]'s public API docs for more
information.
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Dbfs;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_dbfs::Dbfs;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/dropbox/Cargo.toml b/core/services/dropbox/Cargo.toml
index d4e829520..8952013bd 100644
--- a/core/services/dropbox/Cargo.toml
+++ b/core/services/dropbox/Cargo.toml
@@ -34,12 +34,10 @@ all-features = true
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
-log = { workspace = true }
mea = "0.5.1"
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
-tokio = { workspace = true }
[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/dropbox/src/docs.md
b/core/services/dropbox/src/docs.md
index 120804671..084fadf28 100644
--- a/core/services/dropbox/src/docs.md
+++ b/core/services/dropbox/src/docs.md
@@ -20,7 +20,7 @@ This service can be used to:
#### Just provide Access Token (Temporary)
- `access_token`: set the access_token for this backend.
-Please notice its expiration.
+ Please notice its expiration.
#### Or provide Client ID and Client Secret and refresh token (Long Term)
@@ -45,10 +45,9 @@ You can refer to [`DropboxBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::raw::OpWrite;
-use opendal_core::services::Dropbox;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_dropbox::Dropbox;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/etcd/Cargo.toml b/core/services/etcd/Cargo.toml
index 3bbbfde41..0893c3080 100644
--- a/core/services/etcd/Cargo.toml
+++ b/core/services/etcd/Cargo.toml
@@ -31,14 +31,12 @@ version = { workspace = true }
all-features = true
[dependencies]
-bytes = { workspace = true }
ctor = { workspace = true }
etcd-client = { version = "0.17", features = ["tls"] }
fastpool = "1.0.2"
-log = { workspace = true }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
-tokio = { workspace = true }
+tokio = { workspace = true, features = ["time"] }
[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/etcd/src/docs.md b/core/services/etcd/src/docs.md
index bd0527db3..26719cefb 100644
--- a/core/services/etcd/src/docs.md
+++ b/core/services/etcd/src/docs.md
@@ -29,9 +29,9 @@ You can refer to [`EtcdBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Etcd;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_etcd::Etcd;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/foundationdb/Cargo.toml
b/core/services/foundationdb/Cargo.toml
index 9b0ee360e..dd4982506 100644
--- a/core/services/foundationdb/Cargo.toml
+++ b/core/services/foundationdb/Cargo.toml
@@ -31,16 +31,13 @@ version = { workspace = true }
all-features = true
[dependencies]
-bytes = { workspace = true }
ctor = { workspace = true }
foundationdb = { version = "0.9.0", features = [
"embedded-fdb-include",
"fdb-7_3",
] }
-log = { workspace = true }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
-tokio = { workspace = true }
[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/foundationdb/build.rs
b/core/services/foundationdb/build.rs
new file mode 100644
index 000000000..24fcd52ec
--- /dev/null
+++ b/core/services/foundationdb/build.rs
@@ -0,0 +1,51 @@
+// 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.
+
+fn main() {
+ println!("cargo:rerun-if-env-changed=FDB_CLIENT_LIB_PATH");
+
+ #[cfg(target_os = "macos")]
+ {
+ let lib_dir = std::env::var_os("FDB_CLIENT_LIB_PATH")
+ .map(std::path::PathBuf::from)
+ .or_else(find_fdb_client_lib_dir_macos);
+
+ if let Some(path) = lib_dir {
+ println!("cargo:rustc-link-search=native={}", path.display());
+ println!("cargo:rustc-link-arg=-Wl,-rpath,{}", path.display());
+ }
+ }
+}
+
+#[cfg(target_os = "macos")]
+fn find_fdb_client_lib_dir_macos() -> Option<std::path::PathBuf> {
+ const CANDIDATES: &[&str] = &[
+ "/opt/homebrew/opt/foundationdb/lib",
+ "/opt/homebrew/lib",
+ "/usr/local/opt/foundationdb/lib",
+ "/usr/local/lib",
+ ];
+
+ for dir in CANDIDATES {
+ let dir = std::path::Path::new(dir);
+ if dir.join("libfdb_c.dylib").exists() {
+ return Some(dir.to_path_buf());
+ }
+ }
+
+ None
+}
diff --git a/core/services/foundationdb/src/docs.md
b/core/services/foundationdb/src/docs.md
index abbcfc912..e93efa082 100644
--- a/core/services/foundationdb/src/docs.md
+++ b/core/services/foundationdb/src/docs.md
@@ -26,9 +26,9 @@ You can refer to [`FoundationdbBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Foundationdb;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_foundationdb::Foundationdb;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/fs/Cargo.toml b/core/services/fs/Cargo.toml
index 7632e6dbc..177a5ae2f 100644
--- a/core/services/fs/Cargo.toml
+++ b/core/services/fs/Cargo.toml
@@ -31,12 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
- "internal-tokio-rt",
-] }
-
bytes = { workspace = true }
ctor = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
+ "internal-tokio-rt",
+] }
serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["fs", "rt-multi-thread"] }
diff --git a/core/services/ftp/Cargo.toml b/core/services/ftp/Cargo.toml
index 5a690538d..f7c5ac4ab 100644
--- a/core/services/ftp/Cargo.toml
+++ b/core/services/ftp/Cargo.toml
@@ -31,18 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
fastpool = "1.0.2"
-futures = { workspace = true, default-features = false, features = [
- "std",
- "async-await",
-] }
+futures = { workspace = true, features = ["std", "async-await"] }
futures-rustls = "0.26.0"
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
rustls-native-certs = "0.8"
serde = { workspace = true, features = ["derive"] }
suppaftp = { version = "6.3.0", default-features = false, features = [
@@ -50,4 +46,7 @@ suppaftp = { version = "6.3.0", default-features = false,
features = [
"rustls",
"async-rustls",
] }
-tokio = { workspace = true, features = ["macros", "rt", "time"] }
+tokio = { workspace = true, features = ["macros", "time"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/ftp/src/docs.md b/core/services/ftp/src/docs.md
index 0d6791c5c..faf4dd7d7 100644
--- a/core/services/ftp/src/docs.md
+++ b/core/services/ftp/src/docs.md
@@ -26,8 +26,8 @@ You can refer to [`FtpBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
use opendal_core::Operator;
+use opendal_core::Result;
use opendal_service_ftp::Ftp;
#[tokio::main]
diff --git a/core/services/gcs/Cargo.toml b/core/services/gcs/Cargo.toml
index 0727d55ba..5622ade24 100644
--- a/core/services/gcs/Cargo.toml
+++ b/core/services/gcs/Cargo.toml
@@ -31,34 +31,26 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
backon = "1.6"
-base64 = { workspace = true }
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
percent-encoding = "2.3"
quick-xml = { workspace = true, features = ["serialize"] }
reqsign = { workspace = true, features = [
- "services-google",
"reqwest_request",
+ "services-google",
] }
-reqwest = { version = "0.12.24", features = [
+reqwest = { version = "0.12.24", default-features = false, features = [
"json",
"stream",
-], default-features = false }
+] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt"] }
[dev-dependencies]
-pretty_assertions = "1"
serde_json = { workspace = true }
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
-tracing-subscriber = "0.3"
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/gcs/src/docs.md b/core/services/gcs/src/docs.md
index 2d4f12ae1..e628a5de3 100644
--- a/core/services/gcs/src/docs.md
+++ b/core/services/gcs/src/docs.md
@@ -32,10 +32,10 @@ OpenDAL supports the following authentication options:
1. Provide a base64-ed JSON key string with `credential`
2. Provide a JSON key file at explicit path with `credential_path`
3. Provide a JSON key file at implicit path
- - `GcsBackend` will attempt to load Service Account key from [ADC
well-known
places](https://cloud.google.com/docs/authentication/application-default-credentials).
+ - `GcsBackend` will attempt to load Service Account key from [ADC
well-known
places](https://cloud.google.com/docs/authentication/application-default-credentials).
4. Fetch access token from [VM
metadata](https://cloud.google.com/docs/authentication/rest#metadata-server)
- - Only works when running inside Google Cloud.
- - If a non-default Service Account name is required, set with
`service_account`. Otherwise, nothing need to be set.
+ - Only works when running inside Google Cloud.
+ - If a non-default Service Account name is required, set with
`service_account`. Otherwise, nothing need to be set.
5. A custom `TokenLoader` via `GcsBuilder.customized_token_loader()`
Notes:
@@ -49,9 +49,9 @@ Notes:
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Gcs;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_gcs::Gcs;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/ghac/Cargo.toml b/core/services/ghac/Cargo.toml
index dd9e46012..f11196ce3 100644
--- a/core/services/ghac/Cargo.toml
+++ b/core/services/ghac/Cargo.toml
@@ -31,16 +31,18 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-opendal-service-azblob = { path = "../azblob", version = "0.55.0",
default-features = false }
-
bytes = { workspace = true }
ctor = { workspace = true }
ghac = { version = "0.2.0", default-features = false }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+opendal-service-azblob = { path = "../azblob", version = "0.55.0",
default-features = false }
prost = { version = "0.13", default-features = false }
-reqsign = { workspace = true, default-features = false }
+reqsign = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/ghac/src/docs.md b/core/services/ghac/src/docs.md
index 56899239e..e12b7f327 100644
--- a/core/services/ghac/src/docs.md
+++ b/core/services/ghac/src/docs.md
@@ -60,12 +60,10 @@ Refer to [`GhacBuilder`]'s public API docs for more
information.
### Via Builder
-```no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Ghac;
+```rust,no_run
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_ghac::Ghac;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/github/Cargo.toml b/core/services/github/Cargo.toml
index fa158112e..515bfa4a1 100644
--- a/core/services/github/Cargo.toml
+++ b/core/services/github/Cargo.toml
@@ -31,15 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
base64 = { workspace = true }
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[dev-dependencies]
-tokio = { workspace = true, features = ["full"] }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/github/src/docs.md b/core/services/github/src/docs.md
index 9f7b4306b..dad144947 100644
--- a/core/services/github/src/docs.md
+++ b/core/services/github/src/docs.md
@@ -26,11 +26,12 @@ You can refer to [`GithubBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use opendal_service_github::Github;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_github::Github;
#[tokio::main]
-async fn main() -> opendal_core::Result<()> {
+async fn main() -> Result<()> {
// create backend builder
let mut builder = Github::default()
// set the storage root for OpenDAL
diff --git a/core/services/hdfs-native/Cargo.toml
b/core/services/hdfs-native/Cargo.toml
index b6186be67..5cab5303d 100644
--- a/core/services/hdfs-native/Cargo.toml
+++ b/core/services/hdfs-native/Cargo.toml
@@ -31,11 +31,10 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
futures = { workspace = true }
hdfs-native = { version = "0.13" }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
diff --git a/core/services/http/Cargo.toml b/core/services/http/Cargo.toml
index f993b7c7b..8365d2b6c 100644
--- a/core/services/http/Cargo.toml
+++ b/core/services/http/Cargo.toml
@@ -34,6 +34,5 @@ opendal-core = { path = "../../core", version = "0.55.0",
default-features = fal
serde = { version = "1", features = ["derive"] }
[dev-dependencies]
-anyhow = { version = "1.0.100", features = ["std"] }
opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
tokio = { version = "1.48", features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/http/src/docs.md b/core/services/http/src/docs.md
index d11ff8ea0..ad1decdfb 100644
--- a/core/services/http/src/docs.md
+++ b/core/services/http/src/docs.md
@@ -29,9 +29,9 @@ You can refer to [`HttpBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_http::Http;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_http::Http;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/huggingface/Cargo.toml
b/core/services/huggingface/Cargo.toml
index 747d8a907..e6d6c1a84 100644
--- a/core/services/huggingface/Cargo.toml
+++ b/core/services/huggingface/Cargo.toml
@@ -31,12 +31,15 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
percent-encoding = "2"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
+
+[dev-dependencies]
+futures = { workspace = true }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/huggingface/src/config.rs
b/core/services/huggingface/src/config.rs
index 81e557f18..bf81889d2 100644
--- a/core/services/huggingface/src/config.rs
+++ b/core/services/huggingface/src/config.rs
@@ -134,7 +134,7 @@ impl opendal_core::Configurator for HuggingfaceConfig {
mod tests {
use super::*;
use opendal_core::Configurator;
- use opendal_core::types::OperatorUri;
+ use opendal_core::OperatorUri;
#[test]
fn from_uri_sets_repo_type_id_and_revision() {
diff --git a/core/services/huggingface/src/core.rs
b/core/services/huggingface/src/core.rs
index 9186320f2..9e2b87059 100644
--- a/core/services/huggingface/src/core.rs
+++ b/core/services/huggingface/src/core.rs
@@ -292,13 +292,11 @@ pub(super) struct HuggingfaceImport {
#[cfg(test)]
mod tests {
use bytes::Bytes;
-
- use super::*;
use http::{Request, Response, StatusCode};
- use opendal_core::raw::new_json_deserialize_error;
- use opendal_core::types::Result;
use std::sync::{Arc, Mutex};
+ use super::*;
+
// Mock HTTP client that captures the request URL and headers
#[derive(Clone)]
struct MockHttpClient {
diff --git a/core/services/huggingface/src/docs.md
b/core/services/huggingface/src/docs.md
index 071e63425..4f107a761 100644
--- a/core/services/huggingface/src/docs.md
+++ b/core/services/huggingface/src/docs.md
@@ -32,11 +32,9 @@ Refer to [`HuggingfaceBuilder`]'s public API docs for more
information.
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_core::services::Huggingface;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_huggingface::Huggingface;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/huggingface/src/error.rs
b/core/services/huggingface/src/error.rs
index 2592e08b4..d4a09bb80 100644
--- a/core/services/huggingface/src/error.rs
+++ b/core/services/huggingface/src/error.rs
@@ -72,8 +72,6 @@ pub(super) fn parse_error(resp: Response<Buffer>) -> Error {
#[cfg(test)]
mod test {
use super::*;
- use opendal_core::raw::new_json_deserialize_error;
- use opendal_core::types::Result;
#[test]
fn test_parse_error() -> Result<()> {
diff --git a/core/services/ipfs/Cargo.toml b/core/services/ipfs/Cargo.toml
index 107665f8f..9d10c69f4 100644
--- a/core/services/ipfs/Cargo.toml
+++ b/core/services/ipfs/Cargo.toml
@@ -31,12 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
prost = "0.13"
serde = { workspace = true, features = ["derive"] }
diff --git a/core/services/ipfs/src/docs.md b/core/services/ipfs/src/docs.md
index 94671e951..bc83febed 100644
--- a/core/services/ipfs/src/docs.md
+++ b/core/services/ipfs/src/docs.md
@@ -24,8 +24,9 @@ You can refer to [`IpfsBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use opendal::services::Ipfs;
-use opendal::Operator;
+use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_ipfs::Ipfs;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/koofr/Cargo.toml b/core/services/koofr/Cargo.toml
index 9627c0e36..12d5119f9 100644
--- a/core/services/koofr/Cargo.toml
+++ b/core/services/koofr/Cargo.toml
@@ -31,12 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/koofr/src/config.rs
b/core/services/koofr/src/config.rs
index 9de91ff6b..fa3d5ab52 100644
--- a/core/services/koofr/src/config.rs
+++ b/core/services/koofr/src/config.rs
@@ -94,7 +94,7 @@ impl opendal_core::Configurator for KoofrConfig {
mod tests {
use super::*;
use opendal_core::Configurator;
- use opendal_core::types::OperatorUri;
+ use opendal_core::OperatorUri;
#[test]
fn from_uri_sets_endpoint_email_and_root() {
diff --git a/core/services/koofr/src/docs.md b/core/services/koofr/src/docs.md
index 828845167..c2df30763 100644
--- a/core/services/koofr/src/docs.md
+++ b/core/services/koofr/src/docs.md
@@ -26,9 +26,9 @@ You can refer to [`KoofrBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Koofr;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_koofr::Koofr;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/moka/Cargo.toml b/core/services/moka/Cargo.toml
index 6bb402dd8..6b9aaa1ed 100644
--- a/core/services/moka/Cargo.toml
+++ b/core/services/moka/Cargo.toml
@@ -31,9 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
log = { workspace = true }
moka = { version = "0.12", features = ["future", "sync"] }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/moka/src/docs.md b/core/services/moka/src/docs.md
index cf1b63521..bc937804c 100644
--- a/core/services/moka/src/docs.md
+++ b/core/services/moka/src/docs.md
@@ -26,9 +26,9 @@ You can refer to [`MokaBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_moka::Moka;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_moka::Moka;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/mysql/Cargo.toml b/core/services/mysql/Cargo.toml
index 99efc9871..d5a249a3e 100644
--- a/core/services/mysql/Cargo.toml
+++ b/core/services/mysql/Cargo.toml
@@ -31,9 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
sqlx = { version = "0.8.0", features = ["runtime-tokio-rustls", "mysql"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/mysql/src/docs.md b/core/services/mysql/src/docs.md
index c7b6839b8..26f322084 100644
--- a/core/services/mysql/src/docs.md
+++ b/core/services/mysql/src/docs.md
@@ -25,9 +25,9 @@ This service can be used to:
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_mysql::Mysql;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_mysql::Mysql;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/obs/Cargo.toml b/core/services/obs/Cargo.toml
index fbd4292e5..b6f805738 100644
--- a/core/services/obs/Cargo.toml
+++ b/core/services/obs/Cargo.toml
@@ -31,15 +31,17 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
-reqsign = { workspace = true, default-features = false, features = [
+reqsign = { workspace = true, features = [
"services-huaweicloud",
"reqwest_request",
] }
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/obs/src/docs.md b/core/services/obs/src/docs.md
index 0b83fcc6f..c2fcfff24 100644
--- a/core/services/obs/src/docs.md
+++ b/core/services/obs/src/docs.md
@@ -27,8 +27,8 @@ You can refer to [`ObsBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
use opendal_core::Operator;
+use opendal_core::Result;
use opendal_service_obs::Obs;
#[tokio::main]
diff --git a/core/services/onedrive/Cargo.toml
b/core/services/onedrive/Cargo.toml
index 9875dfae0..d0396921a 100644
--- a/core/services/onedrive/Cargo.toml
+++ b/core/services/onedrive/Cargo.toml
@@ -31,26 +31,15 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
mea = { version = "0.5.1" }
-reqwest = { version = "0.12.24", features = [
- "stream",
-], default-features = false }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
-tokio = { workspace = true, features = ["macros", "io-util"] }
+tokio = { workspace = true, features = ["time"] }
[dev-dependencies]
-anyhow = { version = "1.0.100", features = ["std"] }
-pretty_assertions = "1"
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
-tracing-subscriber = "0.3"
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/onedrive/src/docs.md
b/core/services/onedrive/src/docs.md
index 80728800f..c7a2786d6 100644
--- a/core/services/onedrive/src/docs.md
+++ b/core/services/onedrive/src/docs.md
@@ -50,8 +50,9 @@ You should consider [`RetryLayer`] and monitor your
operations carefully.
- `enable_versioning`: Enable versioning support for OneDrive items
The configuration for tokens is one of the following:
-* `access_token` only, for short-lived access. Once the `access_token`
expires, you must recreate the operator with a new token.
-* `refresh_token`, `client_id`, and an optional `client_secret`, for
long-lived access. The operator will automatically get and refresh the access
token.
+
+- `access_token` only, for short-lived access. Once the `access_token`
expires, you must recreate the operator with a new token.
+- `refresh_token`, `client_id`, and an optional `client_secret`, for
long-lived access. The operator will automatically get and refresh the access
token.
## How to get tokens
@@ -59,8 +60,8 @@ The configuration for tokens is one of the following:
2. In "Supported account types", choose "Accounts in any organizational
directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft
accounts (e.g. Skype, Xbox)"
3. Or in an existing application -> manifest, make sure `signInAudience` is
`"AzureADandPersonalMicrosoftAccount"`. That's because we're calling Graph API
with `/common` path segment.
4. The platform you choose determines whether you have to provide a
`client_secret` or not. See [Public and confidential client
apps](https://learn.microsoft.com/en-us/entra/identity-platform/msal-client-applications)
for more information.
- 1. In short, if you choose "Mobile and desktop applications" or
"Single-page application" (Public Client), you must not provide `client_secret`.
- 2. If you choose "Web" (Confidential Client), create a secret in
"Certificates & secrets -> Client secrets -> New client secret", and provide it
as `client_secret`.
+ 1. In short, if you choose "Mobile and desktop applications" or
"Single-page application" (Public Client), you must not provide `client_secret`.
+ 2. If you choose "Web" (Confidential Client), create a secret in
"Certificates & secrets -> Client secrets -> New client secret", and provide it
as `client_secret`.
5. Follow the [code grant
flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow)
or other flows to get the access_token. The minimum scope is
`Files.ReadWrite`. And make sure the access token represents a user, because
it's accessing the user's onedrive by `/me/drive`. So "client credentials flow"
won't work.
6. If you need `refresh_token` for long-lived access, add an additional
`offline_access` scope.
@@ -70,12 +71,12 @@ Read more at [`OnedriveBuilder`].
### Via Builder
-When you have a current access token:
+When you have a current access token:
```rust,no_run
-use anyhow::Result;
-use opendal_service_onedrive::Onedrive;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_onedrive::Onedrive;
#[tokio::main]
async fn main() -> Result<()> {
@@ -92,9 +93,9 @@ async fn main() -> Result<()> {
When you have an Application with a refresh token:
```rust,no_run
-use anyhow::Result;
-use opendal_service_onedrive::Onedrive;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_onedrive::Onedrive;
#[tokio::main]
async fn main() -> Result<()> {
@@ -109,5 +110,4 @@ async fn main() -> Result<()> {
}
```
-
[conflict-behavior]:
https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#instance-attributes
diff --git a/core/services/opfs/Cargo.toml b/core/services/opfs/Cargo.toml
index 336b2e422..fc9107ced 100644
--- a/core/services/opfs/Cargo.toml
+++ b/core/services/opfs/Cargo.toml
@@ -30,11 +30,10 @@ version = { workspace = true }
[package.metadata.docs.rs]
all-features = true
-[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
+[target.'cfg(target_arch = "wasm32")'.dependencies]
ctor = { workspace = true }
js-sys = "0.3.77"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = "0.4.50"
diff --git a/core/services/opfs/src/lib.rs b/core/services/opfs/src/lib.rs
index 0c391e162..98fb8bcba 100644
--- a/core/services/opfs/src/lib.rs
+++ b/core/services/opfs/src/lib.rs
@@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.
+#![cfg(target_arch = "wasm32")]
+
/// Default scheme for opfs service.
pub const OPFS_SCHEME: &str = "opfs";
diff --git a/core/services/oss/Cargo.toml b/core/services/oss/Cargo.toml
index 38e3e064b..6d392824b 100644
--- a/core/services/oss/Cargo.toml
+++ b/core/services/oss/Cargo.toml
@@ -31,29 +31,18 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
reqsign = { workspace = true, features = [
"services-aliyun",
"reqwest_request",
] }
-reqwest = { version = "0.12.24", features = [
- "stream",
-], default-features = false }
serde = { workspace = true, features = ["derive"] }
[dev-dependencies]
-anyhow = "1"
pretty_assertions = "1"
-serde_json = { workspace = true }
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
-tracing-subscriber = "0.3"
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/oss/src/docs.md b/core/services/oss/src/docs.md
index 6ca1e15f6..e55cccc49 100644
--- a/core/services/oss/src/docs.md
+++ b/core/services/oss/src/docs.md
@@ -33,11 +33,9 @@ Refer to [`OssBuilder`]'s public API docs for more
information.
## Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_service_oss::Oss;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_oss::Oss;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/persy/Cargo.toml b/core/services/persy/Cargo.toml
index 4698f3aae..c87806d3e 100644
--- a/core/services/persy/Cargo.toml
+++ b/core/services/persy/Cargo.toml
@@ -31,10 +31,10 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
- "internal-tokio-rt",
-] }
-
ctor = { workspace = true }
-persy = { version = "1.7.1" }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
+persy = "1.7.1"
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/persy/src/docs.md b/core/services/persy/src/docs.md
index 6075621ca..05fe80dc8 100644
--- a/core/services/persy/src/docs.md
+++ b/core/services/persy/src/docs.md
@@ -25,9 +25,9 @@ You can refer to [`PersyBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Persy;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_persy::Persy;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/postgresql/Cargo.toml
b/core/services/postgresql/Cargo.toml
index 926aaeef3..5c26a8af3 100644
--- a/core/services/postgresql/Cargo.toml
+++ b/core/services/postgresql/Cargo.toml
@@ -31,9 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
sqlx = { version = "0.8.0", features = ["runtime-tokio-rustls", "postgres"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/postgresql/src/docs.md
b/core/services/postgresql/src/docs.md
index 9a43a0436..4fb94ef2b 100644
--- a/core/services/postgresql/src/docs.md
+++ b/core/services/postgresql/src/docs.md
@@ -25,9 +25,9 @@ This service can be used to:
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_postgresql::Postgresql;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_postgresql::Postgresql;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/redb/Cargo.toml b/core/services/redb/Cargo.toml
index aead366dc..c4a2d4fc2 100644
--- a/core/services/redb/Cargo.toml
+++ b/core/services/redb/Cargo.toml
@@ -31,10 +31,10 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
- "internal-tokio-rt",
-] }
-
ctor = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
redb = { version = "2" }
serde = { workspace = true, features = ["derive"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/redb/src/docs.md b/core/services/redb/src/docs.md
index 8794adc6f..e4c05489a 100644
--- a/core/services/redb/src/docs.md
+++ b/core/services/redb/src/docs.md
@@ -24,9 +24,9 @@ You can refer to [`RedbBuilder`]'s docs for more information.
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Redb;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_redb::Redb;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/s3/Cargo.toml b/core/services/s3/Cargo.toml
index 923cdedcb..55af551c9 100644
--- a/core/services/s3/Cargo.toml
+++ b/core/services/s3/Cargo.toml
@@ -31,8 +31,6 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
base64 = { workspace = true }
bytes = { workspace = true }
crc32c = "0.6.6"
@@ -40,22 +38,19 @@ ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
md-5 = "0.10"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
reqsign-aws-v4 = { version = "2.0.1", default-features = false }
reqsign-core = { version = "2.0.1", default-features = false }
reqsign-file-read-tokio = { version = "2.0.1", default-features = false }
reqsign-http-send-reqwest = { version = "2.0.1", default-features = false }
-reqwest = { version = "0.12.24", features = [
+reqwest = { version = "0.12.24", default-features = false, features = [
"stream",
-], default-features = false }
+] }
serde = { workspace = true, features = ["derive"] }
[dev-dependencies]
pretty_assertions = "1"
serde_json = { workspace = true }
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3"
diff --git a/core/services/s3/src/docs.md b/core/services/s3/src/docs.md
index 66c2b1d3f..04cc80009 100644
--- a/core/services/s3/src/docs.md
+++ b/core/services/s3/src/docs.md
@@ -56,16 +56,16 @@ The easiest way to configure them is to use helper
functions like
If those functions don't fulfill need, low-level options are also provided:
- Use service managed kms key
- - `server_side_encryption="aws:kms"`
+ - `server_side_encryption="aws:kms"`
- Use customer provided kms key
- - `server_side_encryption="aws:kms"`
- - `server_side_encryption_aws_kms_key_id="your-kms-key"`
+ - `server_side_encryption="aws:kms"`
+ - `server_side_encryption_aws_kms_key_id="your-kms-key"`
- Use S3 managed key
- - `server_side_encryption="AES256"`
+ - `server_side_encryption="AES256"`
- Use customer key
- - `server_side_encryption_customer_algorithm="AES256"`
- - `server_side_encryption_customer_key="base64-of-your-aes256-key"`
- - `server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"`
+ - `server_side_encryption_customer_algorithm="AES256"`
+ - `server_side_encryption_customer_key="base64-of-your-aes256-key"`
+ - `server_side_encryption_customer_key_md5="base64-of-your-aes256-key-md5"`
After SSE have been configured, all requests send by this backed will attach
those headers.
@@ -78,11 +78,9 @@ Reference: [Protecting data using server-side
encryption](https://docs.aws.amazo
### Basic Setup
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_service_s3::S3;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_s3::S3;
#[tokio::main]
async fn main() -> Result<()> {
@@ -124,10 +122,10 @@ async fn main() -> Result<()> {
### S3 with SSE-C
```rust,no_run
-use anyhow::Result;
use log::info;
-use opendal_service_s3::S3;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_s3::S3;
#[tokio::main]
async fn main() -> Result<()> {
@@ -153,10 +151,10 @@ async fn main() -> Result<()> {
### S3 with SSE-KMS and aws managed kms key
```rust,no_run
-use anyhow::Result;
use log::info;
-use opendal_service_s3::S3;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_s3::S3;
#[tokio::main]
async fn main() -> Result<()> {
@@ -183,10 +181,10 @@ async fn main() -> Result<()> {
### S3 with SSE-KMS and customer managed kms key
```rust,no_run
-use anyhow::Result;
use log::info;
-use opendal_service_s3::S3;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_s3::S3;
#[tokio::main]
async fn main() -> Result<()> {
@@ -213,10 +211,10 @@ async fn main() -> Result<()> {
### S3 with SSE-S3
```rust,no_run
-use anyhow::Result;
use log::info;
-use opendal_service_s3::S3;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_s3::S3;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/seafile/Cargo.toml b/core/services/seafile/Cargo.toml
index caa941ee5..834cca095 100644
--- a/core/services/seafile/Cargo.toml
+++ b/core/services/seafile/Cargo.toml
@@ -40,3 +40,6 @@ log = { workspace = true }
mea = "0.5.1"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/seafile/src/docs.md
b/core/services/seafile/src/docs.md
index 8a15214b9..ac1868cc1 100644
--- a/core/services/seafile/src/docs.md
+++ b/core/services/seafile/src/docs.md
@@ -27,9 +27,9 @@ You can refer to [`SeafileBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_core::services::Seafile;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_seafile::Seafile;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/sled/Cargo.toml b/core/services/sled/Cargo.toml
index e6cf682c9..12b3289e4 100644
--- a/core/services/sled/Cargo.toml
+++ b/core/services/sled/Cargo.toml
@@ -31,10 +31,10 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false, features = [
- "internal-tokio-rt",
-] }
-
ctor = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
sled = "0.34.7"
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/sled/src/docs.md b/core/services/sled/src/docs.md
index 62e3d4e5b..c100cb945 100644
--- a/core/services/sled/src/docs.md
+++ b/core/services/sled/src/docs.md
@@ -23,9 +23,9 @@ You can refer to [`SledBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_sled::Sled;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_sled::Sled;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/sqlite/Cargo.toml b/core/services/sqlite/Cargo.toml
index 00867279c..3a7839080 100644
--- a/core/services/sqlite/Cargo.toml
+++ b/core/services/sqlite/Cargo.toml
@@ -31,10 +31,9 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
sqlx = { version = "0.8.0", features = ["runtime-tokio-rustls", "sqlite"] }
diff --git a/core/services/sqlite/src/docs.md b/core/services/sqlite/src/docs.md
index 7848a2941..fcb6aa397 100644
--- a/core/services/sqlite/src/docs.md
+++ b/core/services/sqlite/src/docs.md
@@ -25,8 +25,8 @@ This service can be used to:
### Via Builder
```rust,no_run
-use anyhow::Result;
use opendal_core::Operator;
+use opendal_core::Result;
use opendal_service_sqlite::Sqlite;
#[tokio::main]
@@ -44,4 +44,3 @@ async fn main() -> Result<()> {
Ok(())
}
```
-
diff --git a/core/services/surrealdb/Cargo.toml
b/core/services/surrealdb/Cargo.toml
index b502918d4..64b46e856 100644
--- a/core/services/surrealdb/Cargo.toml
+++ b/core/services/surrealdb/Cargo.toml
@@ -31,9 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
surrealdb = { version = "2", features = ["protocol-http"] }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/surrealdb/src/docs.md
b/core/services/surrealdb/src/docs.md
index 1401d8fa1..02ed68245 100644
--- a/core/services/surrealdb/src/docs.md
+++ b/core/services/surrealdb/src/docs.md
@@ -30,9 +30,9 @@ This service can be used to:
### Via Builder
```rust
-use anyhow::Result;
-use opendal_core::services::Surrealdb;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_surrealdb::Surrealdb;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/swift/Cargo.toml b/core/services/swift/Cargo.toml
index d80ed7269..508aaf4fd 100644
--- a/core/services/swift/Cargo.toml
+++ b/core/services/swift/Cargo.toml
@@ -31,21 +31,14 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
-tokio = { workspace = true, features = [
- "macros",
- "rt-multi-thread",
- "io-util",
-] }
[dev-dependencies]
-anyhow = "1"
-pretty_assertions = "1"
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/swift/src/docs.md b/core/services/swift/src/docs.md
index 1a3e67064..2c9397541 100644
--- a/core/services/swift/src/docs.md
+++ b/core/services/swift/src/docs.md
@@ -25,16 +25,14 @@ Refer to [`SwiftBuilder`]'s public API docs for more
information.
### Via Builder
```rust,no_run
-use std::sync::Arc;
-
-use anyhow::Result;
-use opendal_service_swift::Swift;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_swift::Swift;
#[tokio::main]
async fn main() -> Result<()> {
// Create Swift backend builder
- let mut builder = Swift::default()
+ let mut builder = Swift::default()
// Set the root for swift, all operations will happen under this root
.root("/path/to/dir")
// set the endpoint of Swift backend
diff --git a/core/services/tikv/Cargo.toml b/core/services/tikv/Cargo.toml
index 1686dc076..ca9dc6e64 100644
--- a/core/services/tikv/Cargo.toml
+++ b/core/services/tikv/Cargo.toml
@@ -31,9 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
ctor = { workspace = true }
-mea = { version = "0.5.1" }
+mea = "0.5.1"
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
serde = { workspace = true, features = ["derive"] }
tikv-client = { version = "0.3.0", default-features = false }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/tikv/src/docs.md b/core/services/tikv/src/docs.md
index c69611f04..e09173e93 100644
--- a/core/services/tikv/src/docs.md
+++ b/core/services/tikv/src/docs.md
@@ -27,9 +27,9 @@ You can refer to [`TikvBuilder`]'s docs for more information
### Via Builder
```rust,no_run
-use anyhow::Result;
-use opendal_service_tikv::Tikv;
use opendal_core::Operator;
+use opendal_core::Result;
+use opendal_service_tikv::Tikv;
#[tokio::main]
async fn main() -> Result<()> {
diff --git a/core/services/vercel-blob/Cargo.toml
b/core/services/vercel-blob/Cargo.toml
index d7ff7eb75..375ee7e30 100644
--- a/core/services/vercel-blob/Cargo.toml
+++ b/core/services/vercel-blob/Cargo.toml
@@ -31,12 +31,11 @@ version = { workspace = true }
all-features = true
[dependencies]
-opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
-
bytes = { workspace = true }
ctor = { workspace = true }
http = { workspace = true }
log = { workspace = true }
+opendal-core = { path = "../../core", version = "0.55.0", default-features =
false }
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
diff --git a/core/services/vercel-blob/src/docs.md
b/core/services/vercel-blob/src/docs.md
index 067972ac3..6d06eee3a 100644
--- a/core/services/vercel-blob/src/docs.md
+++ b/core/services/vercel-blob/src/docs.md
@@ -24,8 +24,8 @@ You can refer to [`VercelBlobBuilder`]'s docs for more
information
### Via Builder
```rust,no_run
-use anyhow::Result;
use opendal_core::Operator;
+use opendal_core::Result;
use opendal_service_vercel_blob::VercelBlob;
#[tokio::main]
diff --git a/integrations/object_store/Cargo.toml
b/integrations/object_store/Cargo.toml
index 48589632f..4a17bab9b 100644
--- a/integrations/object_store/Cargo.toml
+++ b/integrations/object_store/Cargo.toml
@@ -41,7 +41,7 @@ async-trait = "0.1"
bytes = "1"
chrono = { version = "0.4.42", features = ["std", "clock"] }
futures = "0.3"
-mea = { version = "0.5.0" }
+mea = "0.5.1"
object_store = "0.12.3"
opendal = { version = "0.55.0", path = "../../core", default-features = false }
pin-project = "1.1"