Skip to main content

Crate litelite

Crate litelite 

Source
Expand description

§litelite — a kit for purpose-sized languages

Thesis: a language’s smallness is not a cost you pay for embeddability — it is what BUYS guarantees big languages cannot give. Fuel-bounded evaluation is a termination proof. A host-capability table is a complete effect bound. Pick the guarantees you need; the kit gives you the largest language for which they stay mechanical.

The kit is the shared kernel of the lite family (rustlite, soliditylite, bashlite — ~19K LOC of purpose-sized languages that each hand-rolled these pieces, with divergent bugs to show for it):

  • diag — spans, coded diagnostics, caret snippets
  • lex — the byte-cursor lexer kit (UTF-8-safe by construction)
  • parse — the recursive-descent harness with the depth guard baked in
  • fuel — fuel + byte budgets: mechanical termination and output bounds
  • cap — host-capability tables as data: one declaration drives checking, import emission, docs, and cross-boundary parity manifests
  • evm / wasm — the two INDEPENDENT emitters (constitution rule 4: absolute jumps and structured control flow share no abstraction): an EVM assembler + diff-oracle interpreter, and a wasm module builder

Zero external dependencies. Native + wasm32.

Re-exports§

pub use caplite as cap;
pub use diaglite as diag;
pub use evmlite as evm;
pub use fuellite as fuel;
pub use lexlite as lex;
pub use modlite as wasm;
pub use parselite as parse;