What Targets Mean Today
The current compiler has a small explicit target table. Inspect it with:
zero targetsThe JSON includes:
schemaVersion- current
host - each target's
hostedflag - aliases
- mapped C target
- capabilities
Host Capabilities
Only the current host target exposes hosted process capabilities:
argsenvfsmemorystdio
Non-host targets currently expose the target-neutral subset:
memorystdio
This means hosted std.fs examples are valid on the host target. Memory-only
packages can still build for target-neutral outputs.
Hosted File I/O
This succeeds on the host target:
zero check examples/resource-cliThe same hosted filesystem surface fails clearly on a non-host target:
zero check --json --target linux-musl-x64 conformance/native/fail/std-fs-target-unsupported.0The diagnostic is TAR002 with repair id remove-hosted-fs-or-use-host-target.
Target-Neutral Memory
std.mem.copy and std.mem.fill do not require hosted filesystem support:
zero build --target linux-musl-x64 examples/memory-package --out .zero/out/memory-packageUse graph and size JSON to inspect target facts:
zero graph --json --target linux-musl-x64 examples/memory-package
zero size --json --target linux-musl-x64 examples/memory-packageBoth outputs include requiresCapabilities, targetSupport, and stdlibHelpers.
Repair Commands
Use zero explain for human and JSON explanations:
zero explain TAR002
zero explain --json TAR002Use fix-plan mode to inspect the canonical repair without editing files:
zero fix --plan --json --target linux-musl-x64 conformance/native/fail/std-fs-target-unsupported.0