Expand description
day-toolchain — ONE place that knows where host toolchains and SDKs live, shared by the
day CLI and by crate build scripts (day-winui-sys, every day-piece-*/day-tweak-* that
compiles its own native shim, and the scaffolds day new generates).
Two rules govern every lookup here (docs/environment.md):
- An environment variable always wins. Each function documents its override(s).
- No literal install paths. Default locations are derived from the platform’s own
environment (
%ProgramFiles%,$HOME,%LOCALAPPDATA%) — never a hardwiredC:\…, so relocated installs (Windows Kits onD:, a portable SDK) work by setting one var.
Functions that are meant to be called from build scripts have _for_build_script variants
that also emit the matching cargo:rerun-if-env-changed= lines, so changing an override
re-runs the script instead of silently keeping stale results.
Functions§
- android_
sdk_ dir - The Android SDK root.
- cppwinrt_
include - The newest
Include\<version>\cppwinrtdirectory (the C++/WinRT projection headers), for compiling WinUI shims withcc. - cppwinrt_
include_ for_ build_ script cppwinrt_includefor build scripts: also emits thererun-if-env-changedlines so an override change re-runs the script.- is_dir
- True when
dirlooks like a usable directory (exists and is a dir) — small helper for callers validating overrides. - jdk21_
home - A JDK 21 home for Gradle (AGP needs 21 exactly — newer JDKs break the jdk-image transform).
- makensis
- The
makensisNSIS compiler (cross-platform: apt/brew/choco all put it on PATH). - rustup_
cargo - The rustup toolchain to use for cross-std builds (mobile targets need rustup’s target std;
a Homebrew/system rustc has none), as
(cargo_path, bin_dir). The bin dir is prepended toPATHso the toolchain’s ownrustc— not one earlier onPATH— is what cargo invokes. - windows_
kit_ tool - A Windows-Kits bin tool (
signtool.exe,makeappx.exe, …): newest SDK version, host arch. - windows_
kits_ roots - Candidate
Windows Kits\10-style roots, best first.