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