[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }
TURBO_PNPM_WORKSPACE_DIR = { value = "", relative = true }

[build]
rustflags = [
  "--cfg",
  "tokio_unstable",
  "-Zshare-generics=y", # make the current crate share its generic instantiations
  "-Zthreads=8", # parallel frontend https://blog.rust-lang.org/2023/11/09/parallel-rustc.html
  "-Csymbol-mangling-version=v0",
]
rustdocflags = ["-Znormalize-docs"]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld"

[target.aarch64-pc-windows-msvc]
linker = "rust-lld"

[target.'cfg(target_os = "macos")']
linker = "rust-lld"

[target.'cfg(all(target_os = "linux", target_env = "gnu"))']
rustflags = [
  "--cfg",
  "tokio_unstable",
  "-Zshare-generics=y",
  "-Zthreads=8",
  "-Csymbol-mangling-version=v0",
  "-Clink-arg=-fuse-ld=lld",
]

[alias]
coverage = "run --bin coverage"
