From 83e4738b612a287190380ac5cc0526b5caa0a64d Mon Sep 17 00:00:00 2001 From: adakarlsson Date: Thu, 11 Jun 2026 22:28:59 +0200 Subject: [PATCH] Add -Zcache-proc-macros flag to config_fast_builds.toml --- .cargo/config_fast_builds.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.cargo/config_fast_builds.toml b/.cargo/config_fast_builds.toml index 34e7428b7b835..eb23c2703b9b9 100644 --- a/.cargo/config_fast_builds.toml +++ b/.cargo/config_fast_builds.toml @@ -65,6 +65,13 @@ # # For more information, see the blog post at . # +# ## `cache-proc-macros` +# +# This option instructs rustc to cache (derive) proc-macro invocations using the incremental system. This can lead +# to a 5-10% decrease of incremental compilation times. +# +# For more information, see https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/cache-proc-macros.html +# # ## `no-embed-metadata` # # This options avoids unnecessary metadata duplication and can reduce the size of the `target` directory by @@ -89,6 +96,7 @@ rustflags = [ # Nightly # "-Zshare-generics=y", # "-Zthreads=0", + # "-Zcache-proc-macros", ] # Some systems may experience linker performance issues when running doc tests. # See https://github.com/bevyengine/bevy/issues/12207 for details. @@ -112,6 +120,7 @@ rustflags = [ # Nightly # "-Zshare-generics=y", # "-Zthreads=0", + # "-Zcache-proc-macros", ] [target.aarch64-apple-darwin] @@ -129,6 +138,7 @@ rustflags = [ # Nightly # "-Zshare-generics=y", # "-Zthreads=0", + # "-Zcache-proc-macros", ] [target.x86_64-pc-windows-msvc] @@ -146,6 +156,7 @@ rustflags = [ # Nightly # "-Zshare-generics=n", # This needs to be off if you use dynamic linking on Windows. # "-Zthreads=0", + # "-Zcache-proc-macros", ] # Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'.