-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathCargo.toml
More file actions
174 lines (151 loc) · 3.87 KB
/
Cargo.toml
File metadata and controls
174 lines (151 loc) · 3.87 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[package]
name = "bgpkit-parser"
version = "0.15.0"
authors = ["Mingwei Zhang <[email protected]>"]
edition = "2021"
license = "MIT"
repository = "https://github.com/bgpkit/bgpkit-parser"
documentation = "https://docs.rs/bgpkit-parser"
description = "MRT/BGP/BMP data processing library"
keywords = ["bgp", "bgpkit", "mrt"]
categories = ["network-programming"]
default-run = "bgpkit-parser"
readme = "README.md"
rust-version = "1.87.0"
[[bin]]
name = "bgpkit-parser"
path = "src/bin/main.rs"
required-features = ["cli"]
# cdylib is required by wasm-pack for WASM builds; rlib is the default for
# normal Rust library usage. Both are listed so the crate works for native
# consumers and wasm-pack alike.
[lib]
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[dependencies]
##############
# BGP models #
##############
ipnet = "2.10"
itertools = "0.14"
log = "0.4"
num_enum = { version = "0.7", features = ["complex-expressions"] }
bitflags = { version = "2.6", features = ["serde"] }
####################
# Core BGP structs #
####################
serde = { version = "1.0", features = ["derive"], optional = true }
#######################
# Parser dependencies #
#######################
bytes = { version = "1.7", optional = true }
zerocopy = { version = "0.8", features = ["derive"], optional = true }
hex = { version = "0.4.3", optional = true } # bmp/openbmp parsing
oneio = { version = "0.21", default-features = false, features = ["http", "gz", "bz"], optional = true }
regex = { version = "1", optional = true } # used in parser filter
chrono = { version = "0.4.38", optional = true } # parser filter
serde_json = { version = "1.0", optional = true } # RIS Live parsing
wasm-bindgen = { version = "0.2", optional = true }
####################
# CLI dependencies #
####################
env_logger = { version = "0.11", optional = true }
clap = { version = "4.5", features = ["derive"], optional = true }
[features]
default = ["parser", "rustls"]
# parsing local files only, removing dependencies for handling remote files
local = ["parser", "oneio"]
parser = [
"bytes",
"chrono",
"regex",
"zerocopy",
]
cli = [
"clap",
"parser",
"env_logger",
"serde",
"serde_json"
]
rislive = [
"parser",
"serde",
"serde_json",
"hex",
]
# WebAssembly bindings for browser/Node.js usage.
# Build with: wasm-pack build --target nodejs --no-default-features --features wasm
wasm = [
"parser",
"serde",
"serde_json",
"dep:wasm-bindgen",
]
serde = [
"dep:serde",
"ipnet/serde",
]
native-tls = [
"oneio/native-tls",
]
rustls = [
"oneio/rustls",
]
# optional compression algorithms support
xz = [
"oneio/xz"
]
lz = [
"oneio/lz"
]
[[bench]]
name = "internals"
harness = false
[[bench]]
name = "bench_main"
harness = false
[dev-dependencies]
regex = "1"
anyhow = "1"
bgpkit-broker = "0.11"
env_logger = "0.11"
kafka = "0.10.0"
tungstenite = "0.29.0"
tokio-tungstenite = "0.28"
tokio = { version = "1", features = ["full"] }
futures-util = "0.3.30"
criterion = { version = "0.8", features = ["html_reports"] }
rayon = "1.10"
bzip2 = "0.6"
flate2 = "1.1"
md5 = "0.8.0"
which = "8"
serde_json = "1.0"
hex = "0.4.3"
tempfile = "3"
ctrlc = "3.4"
tracing = "0.1"
tracing-subscriber = "0.3"
crossbeam-channel = "0.5"
# This list only includes examples which require additional features to run. These are more in the examples directory.
[[example]]
name = "real_time_ris_live_websocket"
required-features = ["rislive"]
[[example]]
name = "real_time_ris_live_websocket_async"
required-features = ["rislive"]
[[example]]
name = "peer_index_table"
required-features = ["serde"]
[[example]]
name = "deprecated_attributes"
required-features = ["serde"]
[[example]]
name = "scan_mrt"
required-features = ["cli"]
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz"
pkg-fmt = "tgz"
[lints.clippy]
uninlined_format_args = "allow"