diff --git a/Cargo.lock b/Cargo.lock index 1131488..6e81eb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -427,6 +427,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", + "version_check", ] [[package]] @@ -642,6 +643,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index 44f0011..a656702 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,10 @@ description = """ """ edition = "2021" -# Because the highest MSRV `tokio` is 1.70.0 -# 因为MSRV最高的`tokio`是1.70.0 -rust-version = "1.70.0" +# 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 @@ -43,11 +44,11 @@ hyper-util = { version = "0.1.8", features = ["tokio", "server-auto", "server-gr # All dependencies required for each demo Gadgets and Kernel binary # 各演示Gadget及Kernel二进制需要的所有依赖项 +nu-ansi-term = { version = "0.50.1", optional = true } tracing-subscriber = { version = "0.3.18", features = ["chrono"], optional = true } -[target.'cfg(windows)'.dependencies] -# https://github.com/tokio-rs/tracing/issues/3068 -nu-ansi-term = { version = "0.50.1", optional = true } +[build-dependencies] +version_check = "0.9.5" [features] tracing = ["dep:tracing"] @@ -55,7 +56,7 @@ kernel = ["tokio/net", "dep:http-body-util", "dep:hyper", "dep:hyper-util"] # The feature set required for all binaries # 所有二进制都需要的特性集合 -bin = ["tracing", "tokio/rt-multi-thread", "tokio/macros", "dep:tracing-subscriber", "dep:nu-ansi-term"] +bin = ["tracing", "tokio/rt-multi-thread", "tokio/macros", "dep:nu-ansi-term", "dep:tracing-subscriber"] # Feature that needs to be enabled for binary `opk` (OpenPlugin Kernel) # 二进制`opk`(OpenPlugin Kernel)需要启用的特性