aboutsummaryrefslogtreecommitdiff
path: root/run-tools.ps1
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-04-12 21:27:34 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-04-12 21:27:34 +0800
commitb33c2f991fa835049dfd8aa6d9ef621ac36d55d3 (patch)
tree9a67e409135ec25f904fcc1e61d4c7c00c428905 /run-tools.ps1
parent0e0423ec631371c04e8e8afa18aa57886f7de53b (diff)
Trim trailing whitespace in generated examples file
Diffstat (limited to 'run-tools.ps1')
-rw-r--r--run-tools.ps126
1 files changed, 26 insertions, 0 deletions
diff --git a/run-tools.ps1 b/run-tools.ps1
new file mode 100644
index 0000000..fa06ecd
--- /dev/null
+++ b/run-tools.ps1
@@ -0,0 +1,26 @@
+Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ErrorAction Stop
+
+if ($args.Count -eq 0) {
+ Write-Host "Available:"
+ if (Test-Path "dev_tools/src/bin") {
+ $files = Get-ChildItem -Path "dev_tools/src/bin/*.rs"
+ foreach ($file in $files) {
+ if ($file -is [System.IO.FileInfo]) {
+ Write-Host $file.BaseName
+ }
+ }
+ } else {
+ Write-Host "Warning: dev_tools/src/bin directory does not exist"
+ }
+ exit 1
+}
+
+$target_bin = $args[0]
+$target_file = "dev_tools/src/bin/${target_bin}.rs"
+
+if (-not (Test-Path $target_file)) {
+ Write-Host "Error: target file '$target_file' does not exist"
+ exit 1
+}
+
+cargo run --manifest-path dev_tools/Cargo.toml --bin $args[0]