Expand description
Rusty Python bindings via PyO3
Usage: import rusty print(rusty.eval(“(+ 1 2)”)) # => “3” r = rusty.Rusty() r.eval(“(define x 42)”) r.eval(“(* x 2)”) # => “84” (stateless: x not persisted)
s = rusty.RustySession() s.eval(“(define x 42)”) s.eval(“(* x 2)”) # => “84” (stateful: x persisted)
Structs§
- Rusty
Interp - Stateless Rusty interpreter. Each eval() call gets a fresh environment. Fast for one-shot tool calls and expression evaluation.
- Rusty
Session - Stateful session. Definitions persist across eval() calls by replaying history into a fresh env each time (an Rc-isolation choice, not a correctness guarantee: side effects replay too, and a form whose replay FAILS — e.g. a file op that only succeeds once — now surfaces as an error naming the failing form instead of silently leaving a partial env).