Skip to content

fix(macros): cache rustc -V output - #13690

Merged
Legend-Master merged 3 commits into
tauri-apps:devfrom
montyc1999:cache-rustc-version
Jun 26, 2025
Merged

fix(macros): cache rustc -V output#13690
Legend-Master merged 3 commits into
tauri-apps:devfrom
montyc1999:cache-rustc-version

Conversation

@montyc1999

Copy link
Copy Markdown
Contributor

The #[tauri::command] macro runs a rustc -V version check for stateful async commands.

Each rustc -V takes 50-100ms on my machine, which can add up to several seconds for a Tauri app with many commands.

To demonstrate this, try adding 100 async commands to the helloworld example like so:
montyc1999@9b0de6b

On my machine, an incremental build with touch examples/helloworld/main.rs && cargo build --example helloworld takes 4.6s without caching, or 1.2s with caching.

@montyc1999
montyc1999 requested a review from a team as a code owner June 26, 2025 02:00
@github-actions

github-actions Bot commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Package Changes Through 237c583

There are 1 changes which include tauri-macros with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-macros 2.3.0 2.3.1
tauri 2.6.0 2.6.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Legend-Master
Legend-Master previously approved these changes Jun 26, 2025

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@Legend-Master
Legend-Master merged commit 0a552a8 into tauri-apps:dev Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants