From 21be013db1dda40ff711f52e2ca8051230ff991d Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Fri, 20 Sep 2024 20:27:30 -0700 Subject: [PATCH] internal: Improve dev compile perf. (#1656) * Add dev configs. * Bump * Update CI. --- .cargo/config.toml | 12 ++++++++++++ .github/workflows/moon.yml | 6 +++++- .github/workflows/rust.yml | 1 - 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 814993c8f04..788690521f0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,17 @@ # https://github.com/johnthagen/min-sized-rust +# https://corrode.dev/blog/tips-for-faster-rust-compile-times/ +# https://davidlattimore.github.io/posts/2024/02/04/speeding-up-the-rust-edit-build-run-cycle.html +# https://eisel.me/lld # [build] # rustflags = ["--cfg", "tokio_unstable"] +[profile.dev] +split-debuginfo = "unpacked" +# Uncomment these 2 if using the debugger! +debug = 0 +strip = "debuginfo" + [profile.release] codegen-units = 1 lto = true @@ -10,5 +19,8 @@ opt-level = "z" panic = "abort" strip = "debuginfo" +# [target.aarch64-apple-darwin] +# rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld"] + # [registries.crates-io] # protocol = "sparse" diff --git a/.github/workflows/moon.yml b/.github/workflows/moon.yml index 2cbbb34545b..1c70aca61a4 100644 --- a/.github/workflows/moon.yml +++ b/.github/workflows/moon.yml @@ -6,6 +6,7 @@ on: - master pull_request: paths: + - .cargo/config.toml - .github/workflows/moon.yml - .moon/*.yml - crates/** @@ -14,6 +15,9 @@ on: - website/** - package.json - yarn.lock + - Cargo.lock + - Cargo.toml + - rust-toolchain.toml jobs: ci: @@ -22,7 +26,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [18, 20] + node-version: [18, 20, 22] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 73c99abe20a..aa48283c4ad 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,7 +12,6 @@ on: - tests/** - Cargo.lock - Cargo.toml - - Makefile.toml - rust-toolchain.toml concurrency: