Anki/.cargo/config.toml
user1823 6ed9b07c41
Add build target directory to Cargo config
Anki's build scripts (ninja) set CARGO_TARGET_DIR for their own execution. But, when running cargo commands directly (like cargo check), those commands don't inherit that environment variable and use the default target/ directory instead, leading to duplicate builds.

After this change, all cargo commands (check, build, test, etc.) will use the same cache, saving storage space.
2026-01-06 19:18:45 +05:30

18 lines
633 B
TOML

[env]
STRINGS_PY = { value = "out/pylib/anki/_fluent.py", relative = true }
STRINGS_TS = { value = "out/ts/lib/generated/ftl.ts", relative = true }
DESCRIPTORS_BIN = { value = "out/rslib/proto/descriptors.bin", relative = true }
# build script will append .exe if necessary
PROTOC = { value = "out/extracted/protoc/bin/protoc", relative = true }
PYO3_NO_PYTHON = "1"
MACOSX_DEPLOYMENT_TARGET = "11"
PYTHONDONTWRITEBYTECODE = "1" # prevent junk files on Windows
[term]
color = "always"
[target.'cfg(all(target_env = "msvc", target_os = "windows"))']
rustflags = ["-C", "target-feature=+crt-static"]
[build]
target-dir = "out/rust"