Skip to main content

Crate grift

Crate grift 

Source
Expand description

§Grift – A Minimalistic Lisp

A simple Lisp built on top of grift_arena, the arena allocator.

§Features

  • No-std, no-alloc: Works in embedded environments with no heap
  • Arena-allocated: All values live in a fixed-size arena
  • Simple API: Parse and evaluate Lisp expressions in one call

§Example

use grift::{Lisp, Value};

let lisp: Lisp<20000> = Lisp::new();
let three = lisp.eval("(+ 1 2)");
assert_eq!(three, Ok(Value::Number(3)));

Structs§

ArenaIndex
Index into the arena.
ArenaStats
Statistics about arena usage.
BuiltinId
Type-safe identifier for built-in functions.
GcStats
Statistics returned by garbage collection.
Lisp
A minimalistic Lisp interpreter backed by a fixed-size arena.

Enums§

ArenaError
Errors that can occur during arena and Lisp operations.
Value
A Lisp value stored in the arena. Variants can only inline max two arenaindex sized data.

Type Aliases§

ArenaResult
Result type for arena operations.