sim_lib_lang_python/
lib.rs1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3mod fidelity;
13mod library_core;
14mod managed;
15mod matrix_row;
16mod objects;
17mod profile;
18mod resumable;
19mod runtime;
20
21#[cfg(test)]
22mod tests;
23
24pub use fidelity::{
25 PYTHON_EVIDENCE_CASES, PYTHON_EXTERNAL_ORACLE, PYTHON_FIDELITY, PythonEvidenceCase,
26 PythonFidelity,
27};
28pub use library_core::{
29 DynamicAdmission, DynamicPython, MatchCase, MatchOutcome, PythonLibraryManifest,
30 PythonModuleAdmission, PythonModulePolicy, PythonSurface, PythonSurfaceState, match_expr,
31 python_library_manifest,
32};
33pub use managed::{PythonHeap, PythonHeapPolicy, PythonManagedKind, PythonManagedObject};
34pub use matrix_row::{python_core_matrix_row, python_core_source_cases};
35pub use objects::{
36 AttributeError, ClassError, DescriptorHook, PythonClass, PythonObjectSpace, PythonObjectValue,
37};
38pub use profile::{install_python_core_profile, python_core_profile, python_profile_symbol};
39pub use resumable::{
40 ContextManager, PythonException, PythonExceptionGroup, PythonGenerator, PythonGeneratorError,
41 PythonGeneratorStep, PythonIterator, run_with_context,
42};
43pub use runtime::{Annotation, PythonEvalPolicy, PythonFunction, PythonValue};
44
45pub const PYTHON_OBJECT_CONTROL_GAPS: &[&str] = &[
47 "custom metaclass construction and __prepare__",
48 "dynamic descriptor protocol mutation after class creation",
49 "weak-reference callbacks and proxy objects",
50 "language-visible __del__ finalizers and resurrection",
51 "async event-loop scheduling and async-generator hooks",
52];
53
54pub type PythonCoroutine<T, D> = PythonGenerator<T, D>;
57
58pub static RECIPES: sim_cookbook::EmbeddedDir =
60 include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));