Skip to main content

Crate rucc_driver

Crate rucc_driver 

Source
Expand description

The driver: command line parsing, the phase graph, job scheduling and the linker invocation.

Design: spec/04-driver-and-cli.md. Layer rank 12, see spec/18-package-layout.md.

This is the only crate that is allowed to know the process exists. It reads the command line, touches the file system, spawns the linker and writes to the terminal, and it hands everything below it a Session. The binary crate is a main that calls run and nothing else, so that the whole driver is reachable from a test.

§Status

--help, --version and --print-config are real, which is the M0 exit criterion in spec/17-milestones.md. The phase graph is real and -### prints it, and the scheduler that will run it is real and tested. Nothing runs the phases yet, and asking it to says so.

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.

Re-exports§

pub use crate::phase::Input;
pub use crate::phase::InputKind;
pub use crate::phase::Job;
pub use crate::phase::LinkJob;
pub use crate::phase::Output;
pub use crate::phase::Phase;
pub use crate::phase::Plan;
pub use crate::schedule::Jobs;

Modules§

phase
The phase graph: what has to happen to each input file, in what order, and where the result goes.
schedule
Running the jobs in a Plan across threads, deterministically.

Structs§

CliError
Why a command line was rejected.

Enums§

Action
What the command line asked for.

Constants§

USAGE
Usage text.
VERSION
The compiler’s version, taken from the workspace manifest.

Functions§

parse_args
Parses a command line, without the program name.
print_config
Renders the resolved configuration.
run
Runs the driver and returns the process exit code.