-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
80 lines (64 loc) · 2.45 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
[package]
name = "opp"
authors = ["29 <[email protected]>"]
version = "0.0.7"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["http", "gateway", "tokio", "tracing", "plug-in"]
categories = ["asynchronous", "authentication", "network-programming", "web-programming", "web-programming::websocket"]
repository = "https://github.com/opensound-org/opp"
homepage = "https://github.com/opensound-org/opp"
documentation = "https://docs.rs/opp"
description = """
🚧 OpenPlugin Protocol (WIP, nothing usable for now).
"""
edition = "2021"
# Because we used `rustc-check-cfg` in build script
# 因为我们在构建脚本中使用了`rustc-check-cfg`
# https://blog.rust-lang.org/2024/05/06/check-cfg.html
rust-version = "1.80.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.docs.rs]
all-features = true
[dependencies]
# ast deps
anyhow = "1.0.89"
# Universal dependencies
# 通用依赖
tokio = { version = "1.40.0", features = [] }
tokio-tungstenite = "0.24.0"
# Universal optional dependencies
# 通用可选依赖
tracing = { version = "0.1.40", optional = true }
tracing-subscriber = { version = "0.3.18", optional = true }
# Kernel dependencies
# 内核依赖
http-body-util = { version = "0.1.2", optional = true }
hyper = { version = "1.4.1", optional = true }
hyper-util = { version = "0.1.9", features = ["tokio", "server-auto", "server-graceful"], optional = true }
# Gadget dependencies
# Gadget依赖
# All dependencies required for each demo Gadgets and Kernel binary
# 各演示Gadget及Kernel二进制需要的所有依赖项
nu-ansi-term = { version = "0.50.1", optional = true }
[build-dependencies]
version_check = "0.9.5"
[features]
kernel = ["tokio/net", "dep:http-body-util", "dep:hyper", "dep:hyper-util"]
gadget = []
tracing = ["dep:tracing"]
tracing-server = []
tracing-layer = ["dep:tracing-subscriber"]
# The feature set required for all binaries
# 所有二进制都需要的特性集合
bin = ["tracing", "tokio/rt-multi-thread", "tokio/macros"]
# The set of features required for all binary `Gadgets`
# 所有`Gadgets`二进制都需要的特性集合
opg = ["gadget", "tracing-layer", "bin"]
# Feature that needs to be enabled for binary `opk` (OpenPlugin Kernel)
# 二进制`opk`(OpenPlugin Kernel)需要启用的特性
opk = ["kernel", "tracing-server", "tracing-subscriber/chrono", "dep:nu-ansi-term", "bin"]
[[bin]]
name = "opk"
path = "src/main.rs"
required-features = ["opk"]