Expand description
day-toolchain is the one place that knows where host toolchains and SDKs live, shared by the
day CLI and by crate build scripts (day-toolkit-xaml-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.
Modules§
- winappsdk
- The Windows App SDK (WinUI 3) a
windows-winuibuild compiles against. The Windows App SDK (WinUI 3) inputs awindows-winuibuild compiles against: the NuGet packages’ headers and runtime DLLs, and C++/WinRT projection headers generated from their metadata (docs/winui.md).
Enums§
- WasmCc
- How a web-dom build gets the C compiler for its
cc-built dependencies (day-sqlite-worker’s bundled SQLite), resolved bywasm_cc.
Functions§
- adb_bin
- The
adbthis machine should use: the SDK’s own copy first, then whatever is on PATH. - android_
sdk_ dir - The Android SDK root.
- android_
sdkmanager - The
sdkmanagerof the SDK’s command-line tools, if they are installed. Android Studio installs them into the SDK (SDK Tools ▸ Android SDK Command-line Tools), not onto PATH. - android_
studio_ homes - Every Android Studio installation this machine has, most likely first.
- android_
studio_ jbr - The JDK Android Studio bundles (its JetBrains Runtime), from the first installation that has one. It is the JDK Studio itself runs Gradle with, so the Android build is known to work on it, whatever other Java the machine has.
- android_
studio_ sdk_ setting - The SDK location Android Studio’s own settings record (Settings ▸ Languages & Frameworks ▸
Android SDK), from the newest Studio configuration directory that has one: its
options/android.sdk.path.xml, whose path may start with Studio’s$USER_HOME$macro. - cppwinrt_
include - The newest
Include\<version>\cppwinrtdirectory (the C++/WinRT projection headers), for compiling XAML 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.- emits_
wasm32 - Whether the clang-style driver at
cccan emit wasm32 objects (--print-targetslists awasm32row). Apple’s Xcode clang is the notable no. - is_dir
- True when
dirlooks like a usable directory (exists and is a dir); a small helper for callers validating overrides. - jdk_
home - A JDK home for the Gradle/AGP build. AGP 9’s minimum is JDK 17, and Gradle must support the exact version. Gradle 9.6 runs on 17…26 (verified: the day scaffold builds on 17, 21 and 26 alike, so the old “21 exactly / 22+ breaks the jdk-image transform” restriction was an AGP-8-era carryover and no longer holds).
- 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’srustc, not one earlier onPATH, is what cargo invokes. - wasm_cc
- The C compiler a web-dom build’s
cc-built dependencies will use forwasm32-unknown-unknown. - 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.