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 (safe, no Rc across threads).