增加条件编译

This commit is contained in:
lubeilin
2023-07-29 18:09:15 +08:00
parent c6aca2c2dc
commit 7c30f2691a
5 changed files with 270 additions and 136 deletions
+7 -1
View File
@@ -15,11 +15,12 @@ crossbeam-skiplist = "0.1"
parking_lot = "0.12.1"
rand = "0.8.5"
sha2 = { version = "0.10.6", features = ["oid"] }
ring = "0.16.20"
thiserror = "1.0.37"
protobuf = "3.2.0"
socket2 ={ version = "0.5.2", features = ["all"] }
tokio = { version = "1.28.1", features = ["full"] }
aes-gcm = {version="0.10.2", optional = true}
ring = {version="0.16.20", optional = true}
[target.'cfg(any(target_os = "linux",target_os = "macos"))'.dependencies]
tun = { path = "./rust-tun" }
@@ -32,3 +33,8 @@ libloading = "0.7.4"
protobuf-codegen = "3.2.0"
protoc-bin-vendored = "3.0.0"
[features]
default=["aes-gcm"]
ring-cipher=["ring"]