Expand description
The Session: the options, the interner and the diagnostic sink that every stage of a
single compilation is handed.
Design: spec/03-architecture.md and spec/04-driver-and-cli.md. Layer rank 3, see
spec/18-package-layout.md.
Everything below the driver reaches the outside world through this type and not through
std::fs, std::env or println!. That is the whole reason the compiler can be used as
a library and tested without spawning a process, and it is enforced by the layer rule
rather than by discipline.
§Status
Options, optimisation levels, emit kinds, diagnostic counting, the source map every span is resolved against, the file system the compiler reads through and the include search path are real. The parallel job model is still a placeholder.
This crate is tier 3 in spec/18-package-layout.md section 18.5: its Rust API is
explicitly unstable and will change without a major version bump.
Structs§
- Dir
- One directory on the search path.
- Dumps
- What the
-dfamily asks to be dumped alongside, or instead of, the preprocessed output. - Found
- A header that was found.
- Gnuc
Version - The GCC release the compiler claims to be, as
__GNUC__,__GNUC_MINOR__and__GNUC_PATCHLEVEL__. - Memory
File System - A file system held in memory, for tests and for embedding the compiler.
- Options
- Everything a compilation was asked to do.
- Search
Path - The directories a header is looked for in, in order.
- Session
- One compilation.
Enums§
- Emit
Kind - What the compiler should produce.
- Include
Form - Which spelling an
#includeused. - OptLevel
- An optimisation level.
- Std
- Which C the source is written in.
Traits§
- File
System - Where the compiler reads source from.