rusche/
lib.rs

1//! Rusche is a library for writing an interpreter for a Scheme-like language in Rust.
2//! It lets you embed a Scheme interpreter into your Rust applications, allowing you
3//! to use Scheme as a scripting language or to create standalone Scheme interpreters.
4//!
5//! To learn how to implement or embed a Rusche interpreter, please have a look at
6//! [rusche-cli](https://github.com/chanryu/rusche/tree/main/examples/rusche-cli).
7//!
8//! To learn more about the Rusche language, please have a look at *.rsc files in
9//! the [examples](https://github.com/chanryu/rusche/tree/main/examples/) directory, or
10//! have a look at the preludes in the [src/prelude.rs](https://github.com/chanryu/rusche/blob/main/src/prelude.rs) file.
11
12mod builtin;
13mod prelude;
14
15mod macros;
16
17pub mod env;
18pub mod eval;
19pub mod expr;
20pub mod lexer;
21pub mod list;
22pub mod parser;
23pub mod proc;
24pub mod span;
25pub mod token;
26pub mod utils;
27
28// Re-export public APIs
29pub use env::Env;
30pub use eval::{eval, eval_tail, EvalContext, EvalError, EvalResult, Evaluator};
31pub use expr::{intern, Expr, Foreign, NIL};
32pub use lexer::{tokenize, LexError, Lexer};
33pub use list::{cons, Cons, List, ListIter};
34pub use parser::{ParseError, Parser};
35pub use proc::{NativeFunc, Proc};
36pub use span::{Loc, Span};
37pub use token::Token;
38pub use utils::{eval_into_foreign, eval_into_int, get_exact_1_arg, get_exact_2_args};