forked from bgpkit/oneio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
100 lines (80 loc) · 2.74 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
[package]
name = "oneio"
version = "0.17.0-beta.1"
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]
# remote
reqwest = { version = "0.12", default-features = false, features = ["blocking", "http2", "charset"], optional = true }
# compression
flate2 = { version = "1", optional = true }
bzip2 = { version = "0.4.4", optional = true }
lz4 = { version = "1.24", optional = true }
xz2 = { version = "0.1", optional = true }
# sha256
ring = { version = "0.17", optional = true }
hex = { version = "0.4", optional = true }
# cli
clap = { version = "4.4", features = ["derive"], optional = true }
tracing = { version = "0.1", optional = true }
# json
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
# s3
rust-s3 = { version = "0.34.0-rc4", optional = true, default-features = false, features = ["sync"] }
dotenvy = { version = "0.15", optional = true }
# ftp
suppaftp = { version = "6.0", optional = true }
thiserror = "1.0"
[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"]
gz = ["flate2"]
bz = ["bzip2"]
lz = ["lz4"]
xz = ["xz2"]
remote = ["reqwest", "suppaftp"]
json = ["serde", "serde_json"]
# s3 support, off by default
s3 = ["rust-s3", "dotenvy"]
[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"