modus
Menu
On this page

The module declaration_eval

Sandboxed .lex declaration evaluator module .

Runs inside a call host with zero grants: no writable store, no network and no root ring. The caller passes a .lex source, an optional dotted field path to force lazily, a read-only bundle of referenced files and declarations, and a lent memory object for the canonical serialized output or refusal.

See: Declarations: Text stops at the evaluation in the repository

declaration_eval module with no entry

Hash
1b0271efc1c8272db4d938059c5b4c0f531b380651ed3dec995c7448eb5b31b8
Size
196608 bytes
Exports
1
Imports
0
Imported by
0
License
MIT

Sandboxed .lex declaration evaluator module

FactValue
KindModules with no entry
Sourcesrc/modules/system/declaration_eval
Boot imageyes: in the boot image, 196608 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
evaluate(source: Bytes(Read), field_path: Bytes(Read), bundle: Bytes(Read), output: Handle(Read, Write)) -> Integerparses and lazily evaluates a .lex declaration in mode declaration with zero side effects, forces field_path when non-empty, and writes the canonical serialized result or typed refusal record into output, returning the byte count written

evaluate

evaluate(source: (Read), field_path: (Read), bundle: (Read), output: (Read, Write)) -> 

evaluate parses and lazily evaluates a .lex declaration in mode declaration with zero side effects, forces field_path when non-empty, and writes the canonical serialized result or typed refusal record into output, returning the byte count written.

Parameters
  • source: (Read)
  • field_path: (Read)
  • bundle: (Read)
  • output: (Read, Write)
Result
When it fails
a negative result, and the error record
Source
src/modules/system/declaration_eval/declaration_eval.odin:62

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

Bytes wire form

A wire form of the module contract: one word of a call. Bytes with no description.

Handle wire form

A wire form of the module contract: one word of a call. A handle that the caller lends for the time of the call, in a register.

Integer wire form

A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.

Error_Record record of a module

A record of the module declaration_eval: 56 bytes, aligned on 8 bytes, 0 bytes of padding.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes