-
Notifications
You must be signed in to change notification settings - Fork 5
/
Cargo.toml
116 lines (96 loc) · 2.89 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[package]
name = "oneio"
version = "0.17.0"
authors = ["Mingwei Zhang <[email protected]>"]
edition = "2021"
readme = "README.md"
license = "MIT"
repository = "https://github.com/bgpkit/oneio"
documentation = "https://docs.rs/oneio"
description = """
OneIO is a Rust library that provides unified simple IO interface for
reading and writing to and from data files from different sources and compressions.
"""
default-run = "oneio"
keywords = ["io", "util", "s3", "ftp"]
[[bin]]
name = "oneio"
path = "src/bin/oneio.rs"
required-features = ["cli"]
[dependencies]
# required dependency
dotenvy = "0.15"
thiserror = "1.0"
# feature: remote
reqwest = { version = "0.12", default-features = false, features = [
"blocking",
"http2",
"charset",
], optional = true }
suppaftp = { version = "6.0", optional = true }
# feature: compressions
flate2 = { version = "1", optional = true }
bzip2 = { version = "0.4.4", optional = true }
lz4 = { version = "1.24", optional = true }
xz2 = { version = "0.1", optional = true }
zstd = { version = "0.13.2", optional = true }
# feature: digest
ring = { version = "0.17", optional = true }
hex = { version = "0.4", optional = true }
# feature: json
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
# feature: s3
rust-s3 = { version = "0.34.0-rc4", optional = true, default-features = false, features = [
"sync",
] }
# feature: cli
clap = { version = "4.4", features = ["derive"], optional = true }
tracing = { version = "0.1", optional = true }
[features]
# default features include the library core and use rustls by default
default = ["lib-core", "rustls"]
# library core dependency to enable reading from local/remote with compressions enabled
lib-core = ["remote", "compressions", "json"]
# cli dependencies
cli = [
# core dependency
"lib-core",
"rustls",
"s3",
"digest",
# CLI specific
"clap",
"tracing",
]
# optional flags to select native-tls or rust-tls
native-tls = [
"reqwest?/default-tls",
"suppaftp?/native-tls",
"rust-s3?/sync-native-tls",
]
rustls = ["reqwest?/rustls-tls", "suppaftp?/rustls", "rust-s3?/sync-rustls-tls"]
digest = ["ring", "hex"]
# supported compression algorithms, which can be toggled on/off individually
compressions = ["gz", "bz", "lz", "xz", "zstd"]
gz = ["flate2"]
bz = ["bzip2"]
lz = ["lz4"]
xz = ["xz2"]
zstd = ["dep:zstd"]
remote = ["reqwest", "suppaftp"]
json = ["serde", "serde_json"]
# s3 support, off by default
s3 = ["rust-s3"]
[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }
tracing = "0.1"
tracing-subscriber = "0.3"
tar = "0.4"
# This list only includes examples which require additional features to run. These are more in the examples' directory.
[[example]]
name = "s3_operations"
required-features = ["s3"]
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz"
pkg-fmt = "tgz"