

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
# 设置 crate 类型，有三个选项：`rlib` (Rust library)，`dylib` (dynamic library)，`cdylib` (C-compatible dynamic library)
crate-type = ["rlib"]
proc-macro = false

[features]
std = []
alloc = []
fs = []
fs_ext = ["fs"]
uuid_v4 = ["uuid/v4", "uuid/fast-rng", "uuid/macro-diagnostics", "uuid"]
base64 = []
algorithm = ["rand"]
ui = ["e-macros"]
macros = ["e-macros"]
images = ["image"]
http = ["reqwest"]
http-blocking = ["reqwest/blocking"]
http-json = ["reqwest/json"]
cmd = ["encoding"]
encode = ["encoding"]
dialog = ["rfd"]
default = ["std"]


[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
thiserror = "^1.0.57"
regex = "^1.10.3"
chrono = "0.4"
lazy_static = "1.4.0"
reqwest = { version = "0.12", optional = true }
uuid = { version = "^1.7.0", optional = true }
rand = { version = "^0.8.5", optional = true, features = ["small_rng"] }
e-macros = { version = "0.1", optional = true }
image = { version = "0.25.0", optional = true }
encoding = { version = "0.2", optional = true }

[target.'cfg(target_os="windows")'.dependencies]
winapi = { version = "0.3", default-features = false, features = [
  "handleapi",
  "processthreadsapi",
  "winerror",
  "fileapi",
  "winbase",
  "std",
] }

[target."cfg(unix)".dependencies.libc]
version = "0.2"

[target."cfg(any(target_os = \"macos\", target_os = \"windows\", target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies.rfd]
version = "^0.14.0"
features = ["xdg-portal", "tokio"]
default-features = false
optional = true


[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies.glib]
version = "0.19"

# If you copy one of the examples into a new project, you should be using
# [dependencies] instead, and delete the **path**.
[dev-dependencies]
e-utils = { path = "./", features = [
  "dialog",
  "fs",
  "cmd",
  "fs_ext",
] }
tempdir = "0.3"

[[example]]
name = "dialog_block"
path = "examples/dialog_block.rs"
[[example]]
name = "dialog"
path = "examples/dialog.rs"
[[example]]
name = "fs_lock"
path = "examples/fs_lock.rs"
[[example]]
name = "fs_lock_share"
path = "examples/fs_lock_share.rs"
[[example]]
name = "fs_custom_flags"
path = "examples/fs_custom_flags.rs"
[[example]]
name = "fs_attributes"
path = "examples/fs_attributes.rs"
[[example]]
name = "fs_lock_access"
path = "examples/fs_lock_access.rs"
[[example]]
name = "fs_security"
path = "examples/fs_security.rs"

[package]
name = "e-utils"
version = "0.3.38"
description = "a rust utils"
authors = [
  "Eternal Night <EternalNight996@gmail.com, EternalNightYeah2@yeah.net>",
]
edition = "2021"
rust-version = "1.76.0"
homepage = "https://gitee.com/eternalnight996"
license-file = "MIT-LICENSE"
readme = "README.md"
documentation = "https://docs.rs/e-utils"
repository = "https://gitee.com/eternalnight996/e-utils"
include = ["src/", "*.md", "*-LICENSE", "Cargo.toml"]
keywords = ["utils", "tools", "e-utils", "e-"]
categories = ["development-tools::build-utils"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "doc_cfg"]
all-features = true
