Expand description
What the other cuno crates share: error classification, output, the cuno home, the environment snapshot, path identity, starting a built program, and the scratch directory. Nothing else belongs here without a change to the spec.
See docs/en/specs/architecture.md, “What goes in cuno-core”.
Modules§
- paths
- Whether two paths are the same place, or one lies inside the other: the
one answer every crate asks (
docs/en/specs/project-layout.md, “Source collection and linking”;docs/en/specs/architecture.md, “What goes incuno-core”). Only comparing uses where a path leads; the path a caller goes on to use or show stays as written, unless the caller normalizes it withlexicalon purpose (the output directory is, once). - program
- Starting a program cuno built: what
cuno runand the test runner both decide the same way (docs/en/specs/architecture.md, “What goes incuno-core”). How its standard streams are handled is the caller’s:cuno runleaves them connected, the test runner captures them. - scratch
- A directory for one run only, shared with nothing else and removed when
the run is done (
docs/en/specs/architecture.md, “What goes incuno-core”).
Structs§
- Env
- Environment variables, looked up by name.
- Shell
- Where cuno’s messages go (stderr for the binary). Crates write through a
Shellinstead of printing, so the color decision is made once.
Enums§
- Color
Choice - A color choice given with
--coloror[term] color(docs/en/specs/commands.md). - Exit
Class - The kind of failure, which decides the exit code. Every error a crate returns says which kind it is, so the binary never has to know the crate’s error types to choose an exit code.
- Home
Error - Why there is no cuno home.
- Name
Case - How names are compared, variables’ and files’ alike, which depends on the operating system they came from.
- Verbosity
- How much a command shows:
-q, nothing given, or-v(or[term] verbose, which-qstill wins over). One value, so quiet and verbose cannot both be in effect (docs/en/specs/commands.md, “Available for all commands”).
Traits§
- Cuno
Error - An error any cuno crate can return to
cuno-cli, which reports it in one place,error: <Display>thenhelp: <help>when there is one, and returnsExitClass::codefor the binary to exit with (crates/cuno-cli/src/lib.rs,report).
Functions§
- colors
- Whether to color:
--color(given), then[term] color(configured), thenNO_COLOR(no_color, set to anything, even empty), then whether the output is aterminal. The one place this order is written; seedocs/en/specs/commands.md, “Available for all commands”. - cuno_
home - The cuno home:
CUNO_HOMEwhen set and not empty, which must be absolute, else.cunounderUSERPROFILE, else underHOME.