Skip to main content

sim_lib_core/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Shared surface-pack substrate for SIM runtime libraries.
4//!
5//! The kernel defines the `Lib`/`Registry`/`ExportRecord` contracts; this crate
6//! supplies the shared substrate for declaring exported value cards as data and
7//! installing them once, idempotently, into a registry.
8
9use sim_kernel::Symbol;
10
11mod read_eval;
12pub mod surface;
13
14/// Recipes embedded at build time from this crate's `recipes/` tree.
15pub static RECIPES: sim_cookbook::EmbeddedDir =
16    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
17
18pub use read_eval::{
19    ConfigEvalNode, HostConfigEvalOptIn, ReadEvalBroker, ReadEvalBrokerLib, ReadEvalDecision,
20    ReadEvalOutcome, ReadEvalRequest, ReadEvalSource, RequestOrigin, config_eval_node_symbol,
21    config_eval_origin_tag, install_read_eval_broker, parse_config_eval_node,
22    read_eval_broker_lib_id, read_eval_broker_symbol, read_eval_decision_run, realize_config_expr,
23};
24pub use surface::{
25    SurfaceField, SurfacePackLib, SurfacePackSpec, SurfaceValueSpec, card_expr, install_once,
26    install_once_id, installed_lib_id,
27};
28
29/// Returns the manifest name under which this surface pack installs (`lisp:core`).
30///
31/// # Examples
32///
33/// ```
34/// use sim_kernel::Symbol;
35///
36/// assert_eq!(sim_lib_core::manifest_name(), Symbol::qualified("lisp", "core"));
37/// ```
38pub fn manifest_name() -> Symbol {
39    Symbol::qualified("lisp", "core")
40}