ci-config.toml

 1# This config is different from config.toml in this directory, as the latter is recognized by Cargo.
 2# This file is placed in ./../.cargo/config.toml on CI runs. Cargo then merges Zeds .cargo/config.toml with ./../.cargo/config.toml
 3# with preference for settings from Zeds config.toml.
 4# TL;DR: If a value is set in both ci-config.toml and config.toml, config.toml value takes precedence.
 5# Arrays are merged together though. See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
 6# The intent for this file is to configure CI build process with a divergance from Zed developers experience; for example, in this config file
 7# we use `-D warnings` for rustflags (which makes compilation fail in presence of warnings during build process). Placing that in developers `config.toml`
 8# would be inconvenient.
 9# The reason for not using the RUSTFLAGS environment variable is that doing so would override all the settings in the config.toml file, even if the contents of the latter are completely nonsensical. See: https://github.com/rust-lang/cargo/issues/5376
10# Here, we opted to use `[target.'cfg(all())']` instead of `[build]` because `[target.'**']` is guaranteed to be cumulative.
11[target.'cfg(all())']
12rustflags = ["-D", "warnings"]
13
14# We don't need fullest debug information for dev stuff (tests etc.) in CI.
15[profile.dev]
16debug = "limited"
17
18# Use Mold on Linux, because it's faster than GNU ld and LLD.
19#
20# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
21# is faster than Mold, in their own ~/.cargo/config.toml.
22[target.x86_64-unknown-linux-gnu]
23linker = "clang"
24rustflags = ["-C", "link-arg=-fuse-ld=mold"]
25
26[target.aarch64-unknown-linux-gnu]
27linker = "clang"
28rustflags = ["-C", "link-arg=-fuse-ld=mold"]