Skip to main content

sim_lib_binding/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Binding behavior for the SIM runtime: lexical, dynamic, and scoped binding.
4//!
5//! The kernel defines the binding-related contracts; this crate supplies the
6//! concrete binding organ (lexical/letrec scopes, dynamic parameters, modes).
7
8mod cell;
9mod claims;
10mod dynamic;
11mod let_form;
12mod lexical;
13mod modes;
14mod runtime;
15
16/// Cookbook recipes for the binding organ, embedded at build time.
17pub static RECIPES: sim_cookbook::EmbeddedDir =
18    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
19
20pub use cell::BindingCell;
21pub use claims::{
22    binding_declared_op_keys, binding_dynamic_let_op_key, binding_let_op_key,
23    binding_let_star_op_key, binding_letrec_op_key, binding_live_ops, binding_op_keys,
24    binding_organ_symbol, binding_parameterize_op_key, binding_profile_modes_op_key,
25    publish_binding_organ_claims, publish_binding_organ_claims_for_lib,
26};
27pub use dynamic::{DynamicEnv, Parameter};
28pub use let_form::LetForm;
29pub use lexical::{
30    BindingInitializer, LexicalEnv, LexicalFunction, eval_let, eval_let_star, eval_letrec,
31    lexical_function_value,
32};
33pub use modes::{BindingProfileModes, BindingScopeMode, HygieneMode};
34pub use runtime::{BindingLib, binding_exports, install_binding_lib, manifest_name};
35
36#[cfg(test)]
37mod tests;