std/project
The vocabulary of project.trb: Project, Dependencies, Program, Profile, Test, Tasks, Workspace,
Registry and Source. A project file is a receiver script against Project, so everything a project can say about
itself is a var field or a method of the types here - and nothing else is needed to write one, because a setting is
written name = "acme/shop" and a section tasks { ... }.
The types are ordinary data, not native: a project file is deterministic and has no IO, so evaluating it is
nothing but running these members. This is what makes a project.trb type check against a real sandbox, with the
same vocabulary the toolchain's own static reading of the file understands.
Modules
std/project/libThe vocabulary ofproject.trb: [Project], [Dependencies], [Program], [Profile], [Test], [Tasks], [Workspace], [Registry] and [Source].
Everything
- type
DependenciesWhat a project depends on. - fn
evaluatedWhat the toolchain runs to evaluate aproject.trb(docs/design/SCRIPTS.md section 7): a fresh [Project], configured by the script, printed back as its settings. - type
ProfileHow one of the two profiles builds (docs/design/PROJECT.md section 5):profile "release" { optimize = 3 }. - type
ProgramA program of the package beyond thesrc/main.trbthat needs no line (docs/design/PROJECT.md section 4):program "migrate", entry: "tools/migrate.trb". - type
ProjectThe receiver ofproject.trb. - type
RegistryAn owner bound to a registry, so a public package can never take the place of a private one. - type
SourceWhere one package comes from instead of the registry its owner is bound to (docs/design/PROJECT.md section 7): a directory (path), a git repository at a revision (git,revision), or an archive with its hash (archive,hash). - type
TasksHow the program's tasks run (docs/design/CONCURRENCY.md section 3):workersthreads run tasks, the core count where the line is left out, andblockingthreads run what blocks (offload), 4 where it is left out. - type
TestWhattorb testruns: every file called*.test.trbin the package. - type
WorkspaceA project that consists of several projects.