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 call::LuaExceptionProfile;
42pub use conformance::{
43    REUSE_LEDGER, ReuseLedgerEntry, run_lua_core_conformance_case, run_lua_core_matrix_row,
44};
45pub use env::LuaEnv;
46pub use eval::LuaEvalPolicy;
47pub use matrix_row::{lua_core_matrix_row, lua_core_source_cases};
48pub use metatable::{lua_get, lua_index_slot, lua_metamethod};
49pub use number::{LuaNumber, lua_float_value, lua_integer_value, lua_number_from_value};
50pub use operator::{LuaOp, lua_binary, lua_len};
51pub use profile::{install_lua_core_profile, lua_core_profile};
52pub use runtime::lua_coroutine;
53pub use stdlib_coroutine::{LuaThread, lua_coroutine_frame_value};
54pub use symbols::{
55    lua_conformance_test_symbol, lua_control_fidelity_symbol, lua_eval_policy_symbol,
56    lua_full_runtime_fidelity_symbol, lua_lowering_symbol, lua_mutation_fidelity_symbol,
57    lua_profile_symbol, lua_reader_symbol,
58};
59pub use table::{
60    LuaTable, LuaTablePolicy, lua_get_metatable, lua_rawdel, lua_rawget, lua_rawset,
61    lua_set_metatable, lua_table, lua_table_from_values, lua_table_value,
62};
63pub use value::LuaResult;
64
65/// Cookbook recipes for this lib, embedded at build time.
66pub static RECIPES: sim_cookbook::EmbeddedDir =
67    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
68
69#[cfg(test)]
70mod lua3_12_tests;
71
72#[cfg(test)]
73mod lua3_13_tests;
74
75#[cfg(test)]
76mod lua3_14_tests;
77
78#[cfg(test)]
79mod tests;