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
11pub mod surface;
12
13/// Recipes embedded at build time from this crate's `recipes/` tree.
14pub static RECIPES: sim_cookbook::EmbeddedDir =
15    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
16
17pub use surface::{
18    SurfaceField, SurfacePackLib, SurfacePackSpec, SurfaceValueSpec, card_expr, install_once,
19    install_once_id, installed_lib_id,
20};
21
22/// Returns the manifest name under which this surface pack installs (`lisp:core`).
23///
24/// # Examples
25///
26/// ```
27/// use sim_kernel::Symbol;
28///
29/// assert_eq!(sim_lib_core::manifest_name(), Symbol::qualified("lisp", "core"));
30/// ```
31pub fn manifest_name() -> Symbol {
32    Symbol::qualified("lisp", "core")
33}