From f790e06bc3ddf72791a1ee902cc49a28a0780445 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 17 Oct 2022 10:04:32 +0200 Subject: [PATCH 1/3] Add cbindgen and bindgen pester test --- images/win/scripts/Tests/Rust.Tests.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Tests/Rust.Tests.ps1 b/images/win/scripts/Tests/Rust.Tests.ps1 index 56ca20f8..5aba1c04 100644 --- a/images/win/scripts/Tests/Rust.Tests.ps1 +++ b/images/win/scripts/Tests/Rust.Tests.ps1 @@ -6,11 +6,13 @@ Describe "Rust" { } $rustTools = @( - @{ToolName = "rustup"; binPath = "C:\Users\Default\.cargo\bin\rustup.exe"} - @{ToolName = "rustc"; binPath = "C:\Users\Default\.cargo\bin\rustc.exe"} - @{ToolName = "cargo"; binPath = "C:\Users\Default\.cargo\bin\cargo.exe"} - @{ToolName = "cargo audit"; binPath = "C:\Users\Default\.cargo\bin\cargo-audit.exe"} - @{ToolName = "cargo outdated"; binPath = "C:\Users\Default\.cargo\bin\cargo-outdated.exe"} + @{ToolName = "rustup"; binPath = "$env:CARGO_HOME\bin\rustup.exe"} + @{ToolName = "rustc"; binPath = "$env:CARGO_HOME\bin\rustc.exe"} + @{ToolName = "bindgen.exe"; binPath = "$env:CARGO_HOME\bin\bindgen.exe"} + @{ToolName = "cbindgen.exe"; binPath = "$env:CARGO_HOME\bin\cbindgen.exe"} + @{ToolName = "cargo"; binPath = "$env:CARGO_HOME\bin\cargo.exe"} + @{ToolName = "cargo audit"; binPath = "$env:CARGO_HOME\bin\cargo-audit.exe"} + @{ToolName = "cargo outdated"; binPath = "$env:CARGO_HOME\bin\cargo-outdated.exe"} ) $rustEnvNotExists = @( From 796a8bc2b37a619e257489a392a401f9c80d0efd Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 17 Oct 2022 12:59:46 +0200 Subject: [PATCH 2/3] replace bindgen to bindgen-cli --- images/win/scripts/Installers/Install-Rust.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Rust.ps1 b/images/win/scripts/Installers/Install-Rust.ps1 index d9b43311..9bd0c2b3 100644 --- a/images/win/scripts/Installers/Install-Rust.ps1 +++ b/images/win/scripts/Installers/Install-Rust.ps1 @@ -24,7 +24,7 @@ rustup target add i686-pc-windows-msvc # Install common tools rustup component add rustfmt clippy -cargo install --locked bindgen cbindgen cargo-audit cargo-outdated +cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated # Cleanup Cargo crates cache Remove-Item "${env:CARGO_HOME}\registry\*" -Recurse -Force From caa3fa7f9fbe0da6a0aab8cdd633c5b7593e527e Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 17 Oct 2022 16:25:50 +0200 Subject: [PATCH 3/3] revert env variable --- images/win/scripts/Tests/Rust.Tests.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/images/win/scripts/Tests/Rust.Tests.ps1 b/images/win/scripts/Tests/Rust.Tests.ps1 index 5aba1c04..3551871b 100644 --- a/images/win/scripts/Tests/Rust.Tests.ps1 +++ b/images/win/scripts/Tests/Rust.Tests.ps1 @@ -6,13 +6,13 @@ Describe "Rust" { } $rustTools = @( - @{ToolName = "rustup"; binPath = "$env:CARGO_HOME\bin\rustup.exe"} - @{ToolName = "rustc"; binPath = "$env:CARGO_HOME\bin\rustc.exe"} - @{ToolName = "bindgen.exe"; binPath = "$env:CARGO_HOME\bin\bindgen.exe"} - @{ToolName = "cbindgen.exe"; binPath = "$env:CARGO_HOME\bin\cbindgen.exe"} - @{ToolName = "cargo"; binPath = "$env:CARGO_HOME\bin\cargo.exe"} - @{ToolName = "cargo audit"; binPath = "$env:CARGO_HOME\bin\cargo-audit.exe"} - @{ToolName = "cargo outdated"; binPath = "$env:CARGO_HOME\bin\cargo-outdated.exe"} + @{ToolName = "rustup"; binPath = "C:\Users\Default\.cargo\bin\rustup.exe"} + @{ToolName = "rustc"; binPath = "C:\Users\Default\.cargo\bin\rustc.exe"} + @{ToolName = "bindgen.exe"; binPath = "C:\Users\Default\.cargo\bin\bindgen.exe"} + @{ToolName = "cbindgen.exe"; binPath = "C:\Users\Default\.cargo\bin\cbindgen.exe"} + @{ToolName = "cargo"; binPath = "C:\Users\Default\.cargo\bin\cargo.exe"} + @{ToolName = "cargo audit"; binPath = "C:\Users\Default\.cargo\bin\cargo-audit.exe"} + @{ToolName = "cargo outdated"; binPath = "C:\Users\Default\.cargo\bin\cargo-outdated.exe"} ) $rustEnvNotExists = @(