mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
Pin rust toolchain (#14817)
* Pin rust toolchain * Always install targets in build script * Delete installed toolchains
This commit is contained in:
6
.github/renovate.json5
vendored
6
.github/renovate.json5
vendored
@@ -51,6 +51,12 @@
|
||||
commitMessagePrefix: "[deps] BRE:",
|
||||
addLabels: ["hold"],
|
||||
},
|
||||
{
|
||||
// Enable support for Rust toolchain updates.
|
||||
matchManagers: ["custom.regex"],
|
||||
matchDepNames: ["rust"],
|
||||
commitMessageTopic: "Rust",
|
||||
},
|
||||
{
|
||||
// By default, we send patch updates to the Dependency Dashboard and do not generate a PR.
|
||||
// We want to generate PRs for a select number of dependencies to ensure we stay up to date on these.
|
||||
|
||||
26
.github/workflows/build-desktop.yml
vendored
26
.github/workflows/build-desktop.yml
vendored
@@ -428,12 +428,6 @@ jobs:
|
||||
- name: Set up environmentF
|
||||
run: choco install checksum --no-progress
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: |
|
||||
rustup target install i686-pc-windows-msvc
|
||||
rustup target install aarch64-pc-windows-msvc
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
@@ -681,10 +675,6 @@ jobs:
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
@@ -890,10 +880,6 @@ jobs:
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
@@ -1040,9 +1026,7 @@ jobs:
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
run: |
|
||||
rustup target add aarch64-apple-darwin
|
||||
node build.js cross-platform
|
||||
run: node build.js cross-platform
|
||||
|
||||
- name: Build
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
@@ -1139,10 +1123,6 @@ jobs:
|
||||
- name: Set up Node-gyp
|
||||
run: python3 -m pip install setuptools
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
@@ -1296,9 +1276,7 @@ jobs:
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: apps/desktop/desktop_native
|
||||
run: |
|
||||
rustup target add aarch64-apple-darwin
|
||||
node build.js cross-platform
|
||||
run: node build.js cross-platform
|
||||
|
||||
- name: Build
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
|
||||
16
apps/desktop/desktop_native/Cargo.lock
generated
16
apps/desktop/desktop_native/Cargo.lock
generated
@@ -889,7 +889,7 @@ dependencies = [
|
||||
"ssh-encoding",
|
||||
"ssh-key",
|
||||
"sysinfo",
|
||||
"thiserror 1.0.69",
|
||||
"thiserror 2.0.12",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
@@ -931,7 +931,7 @@ dependencies = [
|
||||
"cc",
|
||||
"core-foundation",
|
||||
"glob",
|
||||
"thiserror 1.0.69",
|
||||
"thiserror 2.0.12",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
@@ -2480,7 +2480,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
|
||||
dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
"libredox",
|
||||
"thiserror 2.0.11",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2971,11 +2971,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.11"
|
||||
version = "2.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
|
||||
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.11",
|
||||
"thiserror-impl 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2991,9 +2991,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.11"
|
||||
version = "2.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
||||
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
@@ -45,6 +45,10 @@ function buildProxyBin(target, release = true) {
|
||||
}
|
||||
}
|
||||
|
||||
function installTarget(target) {
|
||||
child_process.execSync(`rustup target add ${target}`, { stdio: 'inherit', cwd: __dirname });
|
||||
}
|
||||
|
||||
if (!crossPlatform && !target) {
|
||||
console.log(`Building native modules in ${mode} mode for the native architecture`);
|
||||
buildNapiModule(false, mode === "release");
|
||||
@@ -54,6 +58,7 @@ if (!crossPlatform && !target) {
|
||||
|
||||
if (target) {
|
||||
console.log(`Building for target: ${target} in ${mode} mode`);
|
||||
installTarget(target);
|
||||
buildNapiModule(target, mode === "release");
|
||||
buildProxyBin(target, mode === "release");
|
||||
return;
|
||||
@@ -70,6 +75,7 @@ if (process.platform === "linux") {
|
||||
}
|
||||
|
||||
platformTargets.forEach(([target, _]) => {
|
||||
installTarget(target);
|
||||
buildNapiModule(target);
|
||||
buildProxyBin(target);
|
||||
});
|
||||
|
||||
4
apps/desktop/desktop_native/rust-toolchain.toml
Normal file
4
apps/desktop/desktop_native/rust-toolchain.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "1.85.0"
|
||||
components = [ "rustfmt", "clippy" ]
|
||||
profile = "minimal"
|
||||
Reference in New Issue
Block a user