Schooner is a sandboxed Scheme interpreter you embed in an Elixir app (like Lua/Luerl but with more parentheses). It targets r7rs-small minus its mutable operations — no set!, set-car!, vector-set!, etc. — which keeps the value model immutable and friendly to BEAM idioms. The host hands a script source to Schooner.eval/2, gets back a tagged Elixir term, and resource-bounds the work with the standard process tools (:max_heap_size, Task.shutdown/2).
alias Schooner.Host
env =
Schooner.Environment.new(
libraries: [
Host.library(
primitives: [
{"shout", 1, fn [msg] ->
text = msg |> Host.to_string!(op: "shout") |> String.upcase()
Host.string(text <> "!")
end}
]
)
]
)
Schooner.eval(~s|(import (scheme base)) (shout (string-append "hello, " "world"))|, env)
# => {:ok, "HELLO, WORLD!"}
It implements most of r7rs-small, the deviations are listed in the documentation.






















