[PR #6339] [MERGED] Optimizations and build speedup #25972

Closed
opened 2026-05-29 04:56:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/6339
Author: @BlackDex
Created: 10/2/2025
Status: Merged
Merged: 11/1/2025
Merged by: @dani-garcia

Base: mainHead: llvm-optimizations


📝 Commits (8)

  • 0ea5c4b Optimizations and build speedup
  • f2f8823 Fix release profile
  • 41d3062 Update typos and remove mimalloc check from pre-commit checks
  • a997ce1 Misc fixes and updated typos
  • 9e2506e Update crates and workflows
  • 4b584bf Fix formating and pre-commit
  • 65ad7f0 Update to Rust v1.91 and update crates
  • d42f073 Update web-vault to v2025.10.1 and xx to v1.8.0

📊 Changes

47 files changed (+764 additions, -490 deletions)

View changed files

📝 .github/workflows/build.yml (+28 -13)
📝 .github/workflows/check-templates.yml (+0 -2)
📝 .github/workflows/hadolint.yml (+3 -4)
📝 .github/workflows/release.yml (+10 -10)
📝 .github/workflows/releasecache-cleanup.yml (+1 -1)
📝 .github/workflows/trivy.yml (+2 -4)
.github/workflows/typos.yml (+22 -0)
📝 .github/workflows/zizmor.yml (+1 -1)
📝 .pre-commit-config.yaml (+10 -4)
.typos.toml (+26 -0)
📝 Cargo.lock (+79 -81)
📝 Cargo.toml (+52 -25)
📝 docker/DockerSettings.yaml (+5 -5)
📝 docker/Dockerfile.alpine (+10 -10)
📝 docker/Dockerfile.debian (+8 -8)
📝 docker/README.md (+2 -2)
📝 macros/Cargo.toml (+5 -1)
📝 rust-toolchain.toml (+1 -1)
📝 src/api/admin.rs (+22 -23)
📝 src/api/core/accounts.rs (+10 -9)

...and 27 more files

📄 Description

With this commit I have changed several components to be more efficient.
This can be less llvm-lines generated or less clone() calls.

Config

  • Re-ordered the make_config macro to be more efficient
  • Created a custom Deserializer for ConfigBuilder less code and more efficient
  • Use struct's for the prepare_json function instead of generating a custom JSON object. This generates less code and is more efficient.
  • Updated the get_support_string function to handle the masking differently. This generates less code and also was able to remove some sub-macro-calls

Error

  • Added an extra new call to prevent duplicate Strings in generated macro code. This generated less llvm-lines and seems to be more efficient.
  • Created a custom Serializer for ApiError and CompactApiError This makes that struct smaller in size, so better for memory, but also less llvm-lines.

General

  • Removed once_lock and replace it all with Rust's std LazyLock
  • Added and fixed some Clippy lints which reduced clone() calls for example.
  • Updated build profiles for more efficiency Also added a new profile specifically for CI, which should decrease the build check
  • Updated several GitHub Workflows for better security and use the new ci build profile
  • Updated to Rust v1.90.0 which uses a new linker rust-lld which should help in faster building
  • Updated the Cargo.toml for all crates to better use the workspace variables
  • Added a typos Workflow and Pre-Commit, which should help in detecting spell error's. Also fixed a few found by it.

2025-10-31

  • Updated to Rust v1.91.0
  • Updated web-vault to v2025.10.1

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/6339 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/2/2025 **Status:** ✅ Merged **Merged:** 11/1/2025 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `llvm-optimizations` --- ### 📝 Commits (8) - [`0ea5c4b`](https://github.com/dani-garcia/vaultwarden/commit/0ea5c4bbd63c8a4a499b237e87032089fcd4e086) Optimizations and build speedup - [`f2f8823`](https://github.com/dani-garcia/vaultwarden/commit/f2f882365de9d50643f51091825036f7e127a023) Fix release profile - [`41d3062`](https://github.com/dani-garcia/vaultwarden/commit/41d3062001695bdf0e9ea9b6e76b80fcbf3bd839) Update typos and remove mimalloc check from pre-commit checks - [`a997ce1`](https://github.com/dani-garcia/vaultwarden/commit/a997ce1f80ffe058aa6c0ccd692baba119f35fda) Misc fixes and updated typos - [`9e2506e`](https://github.com/dani-garcia/vaultwarden/commit/9e2506eea53713902c5d34ddaa4595d3dd1d1260) Update crates and workflows - [`4b584bf`](https://github.com/dani-garcia/vaultwarden/commit/4b584bfa00e81487508b34261f138ec066882e8e) Fix formating and pre-commit - [`65ad7f0`](https://github.com/dani-garcia/vaultwarden/commit/65ad7f0bff9e0fd8cfe2ccbb3e65303f6cccc5d1) Update to Rust v1.91 and update crates - [`d42f073`](https://github.com/dani-garcia/vaultwarden/commit/d42f073464dc6d94727b3d9f699054f6daddb9d1) Update web-vault to v2025.10.1 and xx to v1.8.0 ### 📊 Changes **47 files changed** (+764 additions, -490 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+28 -13) 📝 `.github/workflows/check-templates.yml` (+0 -2) 📝 `.github/workflows/hadolint.yml` (+3 -4) 📝 `.github/workflows/release.yml` (+10 -10) 📝 `.github/workflows/releasecache-cleanup.yml` (+1 -1) 📝 `.github/workflows/trivy.yml` (+2 -4) ➕ `.github/workflows/typos.yml` (+22 -0) 📝 `.github/workflows/zizmor.yml` (+1 -1) 📝 `.pre-commit-config.yaml` (+10 -4) ➕ `.typos.toml` (+26 -0) 📝 `Cargo.lock` (+79 -81) 📝 `Cargo.toml` (+52 -25) 📝 `docker/DockerSettings.yaml` (+5 -5) 📝 `docker/Dockerfile.alpine` (+10 -10) 📝 `docker/Dockerfile.debian` (+8 -8) 📝 `docker/README.md` (+2 -2) 📝 `macros/Cargo.toml` (+5 -1) 📝 `rust-toolchain.toml` (+1 -1) 📝 `src/api/admin.rs` (+22 -23) 📝 `src/api/core/accounts.rs` (+10 -9) _...and 27 more files_ </details> ### 📄 Description With this commit I have changed several components to be more efficient. This can be less llvm-lines generated or less `clone()` calls. ### Config - Re-ordered the `make_config` macro to be more efficient - Created a custom Deserializer for `ConfigBuilder` less code and more efficient - Use struct's for the `prepare_json` function instead of generating a custom JSON object. This generates less code and is more efficient. - Updated the `get_support_string` function to handle the masking differently. This generates less code and also was able to remove some sub-macro-calls ### Error - Added an extra new call to prevent duplicate Strings in generated macro code. This generated less llvm-lines and seems to be more efficient. - Created a custom Serializer for `ApiError` and `CompactApiError` This makes that struct smaller in size, so better for memory, but also less llvm-lines. ### General - Removed `once_lock` and replace it all with Rust's std LazyLock - Added and fixed some Clippy lints which reduced `clone()` calls for example. - Updated build profiles for more efficiency Also added a new profile specifically for CI, which should decrease the build check - Updated several GitHub Workflows for better security and use the new `ci` build profile - Updated to Rust v1.90.0 which uses a new linker `rust-lld` which should help in faster building - Updated the Cargo.toml for all crates to better use the `workspace` variables - Added a `typos` Workflow and Pre-Commit, which should help in detecting spell error's. Also fixed a few found by it. #### 2025-10-31 - Updated to Rust v1.91.0 - Updated web-vault to v2025.10.1 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-29 04:56:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#25972