Reference

std/os

What a program asks about the machine it runs on (docs/design/OS.md): the environment it was started with, which system and version it is, and where the user's files belong. The three target constants of std/core are re-exported, so that a file that branches on the system writes one import.

A branch on the system is a match OperatingSystem.current: every arm is type checked on every machine, and only the arm of the build's target is compiled. Each module above is such a branch, and each arm hands its question to a directory of its own - windows/, linux/, macos/, freebsd/ for one system, posix/, bsd/, xdg/ for a standard several share. Those directories hold the raw natives; torb check --every-target reports one that is reached on a system it does not exist on.

Modules

Everything