modus

The program manual

The manual: it shows the documentation of each module of the boot image.

A module carries its documentation in its file: one line that says what the module is, a text, and for each export its name, the name and the type of each parameter, the type of the result, and a text. The build tool takes all of it from the source of the module. This program reads the file only: it does not load the module, and it does not start it.

The page of a module also says how the module can be used. The system has one kind of file for a program, a library and a service, so the answer comes from two facts: the module has an entry or not, and it has exports or not.

Keys:

up, down the module before, the module after

page up, page down move the text

home the start of the text

A click on a name of the list shows that module.

The manual is a service: another program asks for a page with show, and reads a description as a text with about and signature.

FactValue
Sourceprograms/manual
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
modules() -> Table(Module)gives one row for each module of the boot image: its name, its hash, its sizes (code, constants, data, zero), whether it has an entry, its counts of exports, imports and records
exports(name: Text) -> Table(Export)gives one row for each export of a module, by name or by hash, with its signature and the rights that it asks of its handles
imports(name: Text) -> Table(Import)gives one row for each import of a module, by name or by hash: the hash and the name of the imported module, its slots, and the module that the replacement table of the machine gives in its place
importers(name: Text) -> Table(Import)gives the imports, in each module of the boot image, of a module, by name or by hash: who imports it
exporters(name: Text) -> Table(Export)gives the exports with a name, in each module of the boot image: which modules export a function with this name
described(words: Text) -> Table(Export)gives the exports, in each module of the boot image, whose help or documentation holds a text: which modules export a function that does this
handles(right: Text) -> Table(Export)gives the exports, in each module of the boot image, that take a handle with a right: Read, Write, Control, and the other rights of the kernel
slots(name: Text) -> Table(Slot)gives one row for each slot of a module, by name or by hash: the import and the export that the loader writes in it
segments(name: Text) -> Table(Segment)gives one row for each segment of a module, by name or by hash: its kind, its place in memory and in the file
running() -> Table(Running)gives one row for each module that runs in a program, from the module records of the kernel: the program, the module, its hash, and the hash that a replacement changed
replacements() -> Table(Replacement)gives one row for each record of the replacement table of the machine: where an import names the module `from`, a loader gives the module `to`
problem(name: Text) -> Textgives the first rule of the format that a module breaks, by name or by hash, as a sentence: the table, the record and the byte of the file
overview() -> Integershows in the window the table of all the modules of the boot image: their sizes, their counts of exports and imports, who imports each one, and the programs that run it
show(name: Text) -> Integershows the page of a module of the boot image, by name
about(name: Text) -> Textgives the line that says what a module is, by name
signature(name: Text, export: Integer) -> Textgives the description of one export of a module as a text: its name, the name and the type of each parameter, and the type of the result
entry()

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).

What the root service gives it

WhatValueAs the root service says
Grants{.Serve, .Image, .Replacements, .Inspect}It reads the documentation of each module of the boot image, and the module records of each program.
Budget: pages, programs, threads{pages = 2048, programs = 1, threads = 1}Not named in things_of: the budget of each other program.

Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.