modus
Menu

The program imports

A demonstration of the loader: a module with imports, and the replacement of an import (docs/MODULE_CONTRACT.md, "Replacement of an import").

The module agenda imports the module calendar. calendar has a fault: the year 2000 has 365 days. calendar_fixed has the correction and the same description; calendar_changed has another description. This program loads agenda in its own memory with the loader of the system, with no replacement and with each replacement, and shows what the loader answers. It also imports calendar itself: the root service gave it the replacements of the machine when it started it.

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

Exports

ExportWhat it does
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{.Inspect, .Image}It loads modules of the boot image, and measures with the cycle counter.
Budget: pages, programs, threads{pages = 2048, programs = 3, threads = 3}Two programs that import calendar.

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.