Skip to main content

sim_lib_lang_lua/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Lua surface profile for the SIM runtime.
4//!
5//! The kernel defines the codec, eval-policy, and `Expr` contracts; this crate
6//! is a loadable language profile presenting a Lua surface syntax over the
7//! shared `Expr` graph, not a standalone interpreter.
8
9mod call;
10mod closure;
11mod codec_normalize;
12mod conformance;
13mod env;
14mod eval;
15mod forms;
16mod load;
17mod loops;
18mod matrix_row;
19mod metatable;
20mod number;
21mod operator;
22mod pattern_replace;
23mod profile;
24mod runtime;
25mod stdlib_base;
26mod stdlib_coroutine;
27mod stdlib_debug;
28mod stdlib_io;
29mod stdlib_math;
30mod stdlib_os;
31mod stdlib_package;
32mod stdlib_string;
33mod stdlib_string_format;
34mod stdlib_string_pattern;
35mod stdlib_table;
36mod stdlib_utf8;
37mod symbols;
38mod table;
39mod value;
40
41pub use conformance::{
42    REUSE_LEDGER, ReuseLedgerEntry, run_lua_core_conformance_case, run_lua_core_matrix_row,
43};
44pub use env::LuaEnv;
45pub use eval::LuaEvalPolicy;
46pub use matrix_row::{lua_core_matrix_row, lua_core_source_cases};
47pub use metatable::{lua_get, lua_index_slot, lua_metamethod};
48pub use number::{LuaNumber, lua_float_value, lua_integer_value, lua_number_from_value};
49pub use operator::{LuaOp, lua_binary, lua_len};
50pub use profile::{install_lua_core_profile, lua_core_profile};
51pub use runtime::lua_coroutine;
52pub use stdlib_coroutine::{LuaThread, lua_coroutine_frame_value};
53pub use symbols::{
54    lua_conformance_test_symbol, lua_control_fidelity_symbol, lua_eval_policy_symbol,
55    lua_full_runtime_fidelity_symbol, lua_lowering_symbol, lua_mutation_fidelity_symbol,
56    lua_profile_symbol, lua_reader_symbol,
57};
58pub use table::{
59    LuaTable, LuaTablePolicy, lua_get_metatable, lua_rawdel, lua_rawget, lua_rawset,
60    lua_set_metatable, lua_table, lua_table_from_values, lua_table_value,
61};
62pub use value::LuaResult;
63
64/// Cookbook recipes for this lib, embedded at build time.
65pub static RECIPES: sim_cookbook::EmbeddedDir =
66    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
67
68#[cfg(test)]
69mod lua3_12_tests;
70
71#[cfg(test)]
72mod lua3_13_tests;
73
74#[cfg(test)]
75mod lua3_14_tests;
76
77#[cfg(test)]
78mod tests;