Skip to content

Commit

Permalink
add typos and cargo-nextest
Browse files Browse the repository at this point in the history
  • Loading branch information
J-ZhengLi committed Nov 18, 2024
1 parent 3b1df6d commit eb1fa5c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 15 deletions.
6 changes: 6 additions & 0 deletions resources/gen_pkg_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ other_components=(
rust-mingw-$RUST_VERSION-x86_64-pc-windows-gnu
rust-src-$RUST_VERSION
)
# Unless some package needs re-pack, we can just use original link here, since this basically only used for ci.
other_tools=(
x86_64-pc-windows-gnu/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z@https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z
x86_64-pc-windows/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip@https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-0.9.81/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip
# Use re-packed `typos`, which contains only the binary
x86_64-pc-windows/typos-v1.26.0-x86_64-pc-windows-msvc.zip@https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz@https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz
x86_64-unknown-linux-gnu/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz@https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-0.9.81/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz
)

write_dist() {
Expand Down
4 changes: 4 additions & 0 deletions resources/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ x86_64-pc-windows-msvc/rustup-init.exe@http://static.rust-lang.org/rustup/archiv
x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnu/rustup-init@http://static.rust-lang.org/rustup/archive/1.27.1/x86_64-unknown-linux-gnu/rustup-init
x86_64-pc-windows-gnu/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z@https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z
x86_64-pc-windows/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip@https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-0.9.81/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip
x86_64-pc-windows/typos-v1.26.0-x86_64-pc-windows-msvc.zip@https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-pc-windows-msvc.zip
x86_64-unknown-linux/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz@https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz
x86_64-unknown-linux-gnu/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz@https://github.com/nextest-rs/nextest/releases/download/cargo-nextest-0.9.81/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz
31 changes: 23 additions & 8 deletions resources/toolset_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "XuanWu Rust Development Kit"
name = "玄武 Rust 一站式开发套件"
version = "stable v1.81.0"

[rust]
Expand All @@ -9,16 +9,31 @@ optional-components = ["llvm-tools", "rustc-dev"]

[rust.profile]
name = "minimal"
verbose-name = "Basic"
description = "Basic set of tools to use Rust properly"
verbose-name = "Rust 工具链"
description = "Rust 官方工具链,包含 rustc (编译器), rust-std (标准库), cargo (包管理) 等工具"

[tools.descriptions]
llvm-tools = "Contains a collection of LLVM tools. Note that this component has not been stabilized and may change in the future and is provided as-is"
rustc-dev = "Contains the compiler as a library. Most users will not need this; it is only needed for development of tools that link to the compiler, such as making modifications to Clippy."
mingw64 = "(windows only) Requirement for Windows GNU toolchain"
llvm-tools = "包含 LLVM 工具的集合"
rustc-dev = "将编译器作为库来内部 API。大多数用户不需要这个; 仅当开发链接到编译器的工具时才需要它, 例如对 Clippy 进行修改"
mingw64 = "编译器在 x86_64 Windows GNU 环境下的依赖组件"
typos = "源代码拼写检查器,用于查找并纠正源代码中的拼写错误"
cargo-nextest = "新一代 Rust 项目测试运行程序,相比传统 cargo test 而言更快速,界面更简洁明了"

[tools.group]
Prerequisites = ["mingw64"]
"后端编译工具链" = ["mingw64"]
"优选Rust开发工具" = ["typos", "cargo-nextest"]

[tools.target.x86_64-pc-windows-gnu]
mingw64 = { required = true, url = "https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z", version = "14.2.0-rt_v12-rev0" }
mingw64 = { required = true, url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z", version = "14.2.0-rt_v12-rev0" }
# `-msvc` can also be used here as long as these are built.
cargo-nextest = { optional = true, version = "0.9.81", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip" }
typos = { optional = true, version = "1.26.0", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-pc-windows-msvc.zip" }

[tools.target.x86_64-pc-windows-msvc]
cargo-nextest = { optional = true, version = "0.9.81", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip" }
typos = { optional = true, version = "1.26.0", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-pc-windows-msvc.zip" }

[tools.target.x86_64-unknown-linux-gnu]
cargo-nextest = { optional = true, version = "0.9.81", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz" }
# `-musl` target built binary still works here
typos = { optional = true, version = "1.26.0", url = "https://rust-mirror.obs.cn-north-4.myhuaweicloud.com/dist/toolset/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz" }
29 changes: 22 additions & 7 deletions resources/toolset_manifest_noweb.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "XuanWu Rust Development Kit"
name = "玄武 Rust 一站式开发套件"
version = "stable v1.81.0"

[rust]
Expand All @@ -15,16 +15,31 @@ x86_64-unknown-linux-gnu = "packages/x86_64-unknown-linux-gnu/rustup-init"

[rust.profile]
name = "minimal"
verbose-name = "Basic"
description = "Basic set of tools to use Rust properly"
verbose-name = "Rust 工具链"
description = "Rust 官方工具链,包含 rustc (编译器), rust-std (标准库), cargo (包管理) 等工具"

[tools.descriptions]
llvm-tools = "Contains a collection of LLVM tools. Note that this component has not been stabilized and may change in the future and is provided as-is"
rustc-dev = "Contains the compiler as a library. Most users will not need this; it is only needed for development of tools that link to the compiler, such as making modifications to Clippy."
mingw64 = "(windows only) Requirement for Windows GNU toolchain"
llvm-tools = "包含 LLVM 工具的集合"
rustc-dev = "将编译器作为库来内部 API。大多数用户不需要这个; 仅当开发链接到编译器的工具时才需要它, 例如对 Clippy 进行修改"
mingw64 = "编译器在 x86_64 Windows GNU 环境下的依赖组件"
typos = "源代码拼写检查器,用于查找并纠正源代码中的拼写错误"
cargo-nextest = "新一代 Rust 项目测试运行程序,相比传统 cargo test 而言更快速,界面更简洁明了"

[tools.group]
Prerequisites = ["mingw64"]
"后端编译工具链" = ["mingw64"]
"优选Rust开发工具" = ["typos", "cargo-nextest"]

[tools.target.x86_64-pc-windows-gnu]
mingw64 = { required = true, path = "packages/x86_64-pc-windows-gnu/x86_64-14.2.0-release-posix-seh-ucrt-rt_v12-rev0.7z", version = "14.2.0-rt_v12-rev0" }
# `-msvc` can also be used here as long as these are built.
cargo-nextest = { optional = true, version = "0.9.81", path = "packages/x86_64-pc-windows/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip" }
typos = { optional = true, version = "1.26.0", path = "packages/x86_64-pc-windows/typos-v1.26.0-x86_64-pc-windows-msvc.zip" }

[tools.target.x86_64-pc-windows-msvc]
cargo-nextest = { optional = true, version = "0.9.81", path = "packages/x86_64-pc-windows/cargo-nextest-0.9.81-x86_64-pc-windows-msvc.zip" }
typos = { optional = true, version = "1.26.0", path = "packages/x86_64-pc-windows/typos-v1.26.0-x86_64-pc-windows-msvc.zip" }

[tools.target.x86_64-unknown-linux-gnu]
cargo-nextest = { optional = true, version = "0.9.81", path = "packages/x86_64-unknown-linux/typos-v1.26.0-x86_64-unknown-linux-musl.tar.gz" }
# `-musl` target built binary still works here
typos = { optional = true, version = "1.26.0", path = "packages/x86_64-unknown-linux-gnu/cargo-nextest-0.9.81-x86_64-unknown-linux-gnu.tar.gz" }

0 comments on commit eb1fa5c

Please sign in to comment.