# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

[package]
categories = ["filesystem"]
description = "Apache OpenDAL™: One Layer, All Storage."
exclude = ["/tests/"]
keywords = ["storage", "fs", "s3", "azblob", "gcs"]
name = "opendal-core"
readme = "README.md"

authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }

[lints.clippy]
unused_async = "warn"

[package.metadata.docs.rs]
all-features = true

[features]
default = ["executors-tokio"]

# Enable opendal's blocking support.
blocking = ["internal-tokio-rt"]

# Enable tokio runtime.
internal-tokio-rt = ["tokio/rt-multi-thread"]

# Enable tokio executors support.
executors-tokio = ["tokio/rt"]

# Enable reqsign integration.
#
# This wires OpenDAL's `HttpTransporter` into reqsign as an `HttpSend` backend,
# so signing services (s3, gcs, azblob, ...) can load credentials over HTTP.
# Services that need request signing enable it automatically; it is off by
# default so local-only services (memory, fs, ...) don't pull in reqsign-core.
reqsign = ["dep:reqsign-core"]

# Deprecated: memory service is always enabled.
services-memory = []

[lib]
bench = false

[dependencies]
# Required dependencies
anyhow = { version = "1.0.100", features = ["std"] }
asyncband = { workspace = true }
base64 = { workspace = true }
bytes = { workspace = true }
futures = { workspace = true, features = ["std", "async-await"] }
http = { workspace = true }
jiff = { version = "0.2.28", features = ["serde"] }
log = { workspace = true }
md-5 = "0.11.0"
percent-encoding = "2"
quick-xml = { workspace = true, features = ["serialize", "overlapped-lists"] }
reqsign-core = { version = "3.2.0", default-features = false, optional = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["macros", "io-util"] }
url = { workspace = true }
uuid = { workspace = true, features = ["serde", "v4"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
jiff = { version = "0.2.28", features = ["serde", "js"] }
tokio = { workspace = true, features = ["time"] }
uuid = { workspace = true, features = ["serde", "v4", "js"] }

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
web-time = { version = "1.1.0" }

[dev-dependencies]
logforth = { workspace = true }
pretty_assertions = "1"
rand = { workspace = true }
sha2 = { workspace = true }
tokio = { workspace = true, features = [
  "fs",
  "macros",
  "rt-multi-thread",
  "time",
] }
