1#![allow(unsafe_code)]
35#![allow(non_camel_case_types)]
36#![allow(non_snake_case)]
37#![allow(non_upper_case_globals)]
38
39pub mod array;
40pub mod closure;
41pub mod consts;
42pub mod ctor;
43pub mod external;
44pub mod init;
45pub mod io;
46pub mod nat_int;
47pub mod object;
48pub mod refcount;
49pub mod scalar;
50pub mod string;
51pub mod supported;
52pub mod types;
53
54pub(crate) mod repr;
55
56pub use consts::{LEAN_HEADER_DIGEST, LEAN_HEADER_PATH, LEAN_RESOLVED_VERSION, LEAN_VERSION};
57pub use supported::{
58 SUPPORTED_TOOLCHAINS, SupportedToolchain, supported_by_digest, supported_for, symbol_present_in_window,
59};
60pub use types::{b_lean_obj_arg, b_lean_obj_res, lean_obj_arg, lean_obj_res, lean_object, u_lean_obj_arg};
61
62#[must_use]
70pub fn symbol_in_all(symbol: &str) -> bool {
71 REQUIRED_SYMBOLS.contains(&symbol) && symbol_present_in_window(symbol)
72}
73
74pub const REQUIRED_SYMBOLS: &[&str] = &[
80 "lean_initialize",
82 "lean_initialize_runtime_module",
83 "lean_initialize_thread",
84 "lean_finalize_thread",
85 "lean_setup_args",
86 "lean_init_task_manager",
87 "lean_init_task_manager_using",
88 "lean_finalize_task_manager",
89 "lean_dec_ref_cold",
91 "lean_mark_mt",
92 "lean_mark_persistent",
93 "lean_alloc_object",
95 "lean_free_object",
96 "lean_object_byte_size",
97 "lean_object_data_byte_size",
98 "lean_array_mk",
100 "lean_array_push",
101 "lean_array_to_list",
102 "lean_array_get_panic",
103 "lean_array_set_panic",
104 "lean_mk_string",
106 "lean_mk_string_unchecked",
107 "lean_mk_string_from_bytes",
108 "lean_mk_string_from_bytes_unchecked",
109 "lean_mk_ascii_string_unchecked",
110 "lean_string_push",
111 "lean_string_append",
112 "lean_string_mk",
113 "lean_string_data",
114 "lean_string_utf8_get",
115 "lean_string_utf8_next",
116 "lean_string_utf8_prev",
117 "lean_string_utf8_set",
118 "lean_string_utf8_extract",
119 "lean_string_eq_cold",
120 "lean_string_lt",
121 "lean_string_hash",
122 "lean_utf8_strlen",
123 "lean_utf8_n_strlen",
124 "lean_nat_big_succ",
126 "lean_nat_big_add",
127 "lean_nat_big_sub",
128 "lean_nat_big_mul",
129 "lean_nat_big_div",
130 "lean_nat_big_mod",
131 "lean_nat_big_eq",
132 "lean_nat_big_le",
133 "lean_nat_big_lt",
134 "lean_nat_overflow_mul",
135 "lean_int_big_neg",
137 "lean_int_big_add",
138 "lean_int_big_sub",
139 "lean_int_big_mul",
140 "lean_int_big_div",
141 "lean_int_big_mod",
142 "lean_int_big_eq",
143 "lean_int_big_le",
144 "lean_int_big_lt",
145 "lean_int_big_nonneg",
146 "lean_big_usize_to_nat",
148 "lean_big_uint64_to_nat",
149 "lean_cstr_to_nat",
150 "lean_big_int_to_int",
151 "lean_big_size_t_to_int",
152 "lean_big_int64_to_int",
153 "lean_cstr_to_int",
154 "lean_uint8_of_big_nat",
155 "lean_apply_1",
157 "lean_apply_2",
158 "lean_apply_3",
159 "lean_apply_4",
160 "lean_apply_5",
161 "lean_apply_6",
162 "lean_apply_7",
163 "lean_apply_8",
164 "lean_apply_9",
165 "lean_apply_10",
166 "lean_apply_11",
167 "lean_apply_12",
168 "lean_apply_13",
169 "lean_apply_14",
170 "lean_apply_15",
171 "lean_apply_16",
172 "lean_apply_n",
173 "lean_apply_m",
174 "lean_io_mark_end_initialization",
176 "lean_register_external_class",
178];