Skip to main content

Module layout

Module layout 

Source
Expand description

Layout invariants — the Rust-enforced package structure.

This is the caixa analog of Cargo’s implicit src/lib.rs vs src/main.rs rule: the Rust type system dictates the package shape, and the invariant checker runs before any build step. StandardLayout encodes the canonical layout:

  • caixa.lisp — always required
  • lib/<nome>.lisp — required when :kind Biblioteca and :bibliotecas is empty
  • each :bibliotecas — must resolve on disk
  • each :exe — must resolve on disk, under exe/
  • each :servicos — must resolve on disk, under servicos/

Filesystem I/O is injected through StandardLayout::with_path_exists so tests can run without touching disk.

Structs§

StandardLayout
The default layout contract.

Enums§

LayoutError

Traits§

LayoutInvariants
Contract — a caixa layout checker.