Instructions for checking, building, debugging, and understanding the Carbon toolchain.
toolchain/:
lower/parse/: Parsing (Token -> Parse Tree).sem_ir/: Semantic Intermediate Representation
(SemIR) definitions.toolchain/docs for detailed
architecture design and patterns.
ValueStore, formatting
.def files, struct reflection) used throughout the implementation..def files and expanded by way of macros.Handle<StateName> in parse/handle_*.cpp.HandleParseNode in check/handle_*.cpp.HandleInst in lower/handle_*.cpp.bazelisk test //...bazelisk test //toolchain/testing:file_testbazelisk test //toolchain/testing:file_test --test_arg=--file_tests=<path_to_carbon_file>bazelisk build //toolchain/...Carbon tests often use file_test (for example,
//toolchain/testing/file_test). For detailed guidelines on authoring tests,
including file splits, naming conventions (fail_, todo_), and generating
minimal output with SemIR dumps, please refer to the Toolchain tests skill.
If you change compiler behavior, you likely need to update expected test outputs. Do not manually edit thousands of lines of expected output. Use the