1pub const JS_PROP_CONFIGURABLE: u32 = 1;
4pub const JS_PROP_WRITABLE: u32 = 2;
5pub const JS_PROP_ENUMERABLE: u32 = 4;
6pub const JS_PROP_C_W_E: u32 = 7;
7pub const JS_PROP_LENGTH: u32 = 8;
8pub const JS_PROP_TMASK: u32 = 48;
9pub const JS_PROP_NORMAL: u32 = 0;
10pub const JS_PROP_GETSET: u32 = 16;
11pub const JS_PROP_VARREF: u32 = 32;
12pub const JS_PROP_AUTOINIT: u32 = 48;
13pub const JS_PROP_HAS_SHIFT: u32 = 8;
14pub const JS_PROP_HAS_CONFIGURABLE: u32 = 256;
15pub const JS_PROP_HAS_WRITABLE: u32 = 512;
16pub const JS_PROP_HAS_ENUMERABLE: u32 = 1024;
17pub const JS_PROP_HAS_GET: u32 = 2048;
18pub const JS_PROP_HAS_SET: u32 = 4096;
19pub const JS_PROP_HAS_VALUE: u32 = 8192;
20pub const JS_PROP_THROW: u32 = 16384;
21pub const JS_PROP_THROW_STRICT: u32 = 32768;
22pub const JS_PROP_NO_ADD: u32 = 65536;
23pub const JS_PROP_NO_EXOTIC: u32 = 131072;
24pub const JS_PROP_DEFINE_PROPERTY: u32 = 262144;
25pub const JS_PROP_REFLECT_DEFINE_PROPERTY: u32 = 524288;
26pub const JS_DEFAULT_STACK_SIZE: u32 = 1048576;
27pub const JS_EVAL_TYPE_GLOBAL: u32 = 0;
28pub const JS_EVAL_TYPE_MODULE: u32 = 1;
29pub const JS_EVAL_TYPE_DIRECT: u32 = 2;
30pub const JS_EVAL_TYPE_INDIRECT: u32 = 3;
31pub const JS_EVAL_TYPE_MASK: u32 = 3;
32pub const JS_EVAL_FLAG_STRICT: u32 = 8;
33pub const JS_EVAL_FLAG_UNUSED: u32 = 16;
34pub const JS_EVAL_FLAG_COMPILE_ONLY: u32 = 32;
35pub const JS_EVAL_FLAG_BACKTRACE_BARRIER: u32 = 64;
36pub const JS_EVAL_FLAG_ASYNC: u32 = 128;
37pub const JS_DUMP_BYTECODE_FINAL: u32 = 1;
38pub const JS_DUMP_BYTECODE_PASS2: u32 = 2;
39pub const JS_DUMP_BYTECODE_PASS1: u32 = 4;
40pub const JS_DUMP_BYTECODE_HEX: u32 = 16;
41pub const JS_DUMP_BYTECODE_PC2LINE: u32 = 32;
42pub const JS_DUMP_BYTECODE_STACK: u32 = 64;
43pub const JS_DUMP_BYTECODE_STEP: u32 = 128;
44pub const JS_DUMP_READ_OBJECT: u32 = 256;
45pub const JS_DUMP_FREE: u32 = 512;
46pub const JS_DUMP_GC: u32 = 1024;
47pub const JS_DUMP_GC_FREE: u32 = 2048;
48pub const JS_DUMP_MODULE_RESOLVE: u32 = 4096;
49pub const JS_DUMP_PROMISE: u32 = 8192;
50pub const JS_DUMP_LEAKS: u32 = 16384;
51pub const JS_DUMP_ATOM_LEAKS: u32 = 32768;
52pub const JS_DUMP_MEM: u32 = 65536;
53pub const JS_DUMP_OBJECTS: u32 = 131072;
54pub const JS_DUMP_ATOMS: u32 = 262144;
55pub const JS_DUMP_SHAPES: u32 = 524288;
56pub const JS_ABORT_ON_LEAKS: u32 = 1097728;
57pub const JS_ATOM_NULL: u32 = 0;
58pub const JS_CALL_FLAG_CONSTRUCTOR: u32 = 1;
59pub const JS_EVAL_OPTIONS_VERSION: u32 = 1;
60pub const JS_INVALID_CLASS_ID: u32 = 0;
61pub const JS_GPN_STRING_MASK: u32 = 1;
62pub const JS_GPN_SYMBOL_MASK: u32 = 2;
63pub const JS_GPN_PRIVATE_MASK: u32 = 4;
64pub const JS_GPN_ENUM_ONLY: u32 = 16;
65pub const JS_GPN_SET_ENUM: u32 = 32;
66pub const JS_WRITE_OBJ_BYTECODE: u32 = 1;
67pub const JS_WRITE_OBJ_BSWAP: u32 = 0;
68pub const JS_WRITE_OBJ_SAB: u32 = 4;
69pub const JS_WRITE_OBJ_REFERENCE: u32 = 8;
70pub const JS_WRITE_OBJ_STRIP_SOURCE: u32 = 16;
71pub const JS_WRITE_OBJ_STRIP_DEBUG: u32 = 32;
72pub const JS_READ_OBJ_BYTECODE: u32 = 1;
73pub const JS_READ_OBJ_ROM_DATA: u32 = 0;
74pub const JS_READ_OBJ_SAB: u32 = 4;
75pub const JS_READ_OBJ_REFERENCE: u32 = 8;
76pub const JS_DEF_CFUNC: u32 = 0;
77pub const JS_DEF_CGETSET: u32 = 1;
78pub const JS_DEF_CGETSET_MAGIC: u32 = 2;
79pub const JS_DEF_PROP_STRING: u32 = 3;
80pub const JS_DEF_PROP_INT32: u32 = 4;
81pub const JS_DEF_PROP_INT64: u32 = 5;
82pub const JS_DEF_PROP_DOUBLE: u32 = 6;
83pub const JS_DEF_PROP_UNDEFINED: u32 = 7;
84pub const JS_DEF_OBJECT: u32 = 8;
85pub const JS_DEF_ALIAS: u32 = 9;
86pub const JS_DEF_PROP_SYMBOL: u32 = 10;
87pub const JS_DEF_PROP_BOOL: u32 = 11;
88pub type size_t = ::core::ffi::c_ulong;
89#[repr(C)]
90#[derive(Debug, Copy, Clone)]
91pub struct JSRuntime {
92 _unused: [u8; 0],
93}
94#[repr(C)]
95#[derive(Debug, Copy, Clone)]
96pub struct JSContext {
97 _unused: [u8; 0],
98}
99#[repr(C)]
100#[derive(Debug, Copy, Clone)]
101pub struct JSObject {
102 _unused: [u8; 0],
103}
104#[repr(C)]
105#[derive(Debug, Copy, Clone)]
106pub struct JSClass {
107 _unused: [u8; 0],
108}
109pub type JSClassID = u32;
110pub type JSAtom = u32;
111pub const JS_TAG_FIRST: _bindgen_ty_3 = -9;
112pub const JS_TAG_BIG_INT: _bindgen_ty_3 = -9;
113pub const JS_TAG_SYMBOL: _bindgen_ty_3 = -8;
114pub const JS_TAG_STRING: _bindgen_ty_3 = -7;
115pub const JS_TAG_STRING_ROPE: _bindgen_ty_3 = -6;
116pub const JS_TAG_MODULE: _bindgen_ty_3 = -3;
117pub const JS_TAG_FUNCTION_BYTECODE: _bindgen_ty_3 = -2;
118pub const JS_TAG_OBJECT: _bindgen_ty_3 = -1;
119pub const JS_TAG_INT: _bindgen_ty_3 = 0;
120pub const JS_TAG_BOOL: _bindgen_ty_3 = 1;
121pub const JS_TAG_NULL: _bindgen_ty_3 = 2;
122pub const JS_TAG_UNDEFINED: _bindgen_ty_3 = 3;
123pub const JS_TAG_UNINITIALIZED: _bindgen_ty_3 = 4;
124pub const JS_TAG_CATCH_OFFSET: _bindgen_ty_3 = 5;
125pub const JS_TAG_EXCEPTION: _bindgen_ty_3 = 6;
126pub const JS_TAG_SHORT_BIG_INT: _bindgen_ty_3 = 7;
127pub const JS_TAG_FLOAT64: _bindgen_ty_3 = 8;
128pub type _bindgen_ty_3 = ::core::ffi::c_int;
129#[repr(C)]
130#[derive(Copy, Clone)]
131pub union JSValueUnion {
132 pub int32: i32,
133 pub float64: f64,
134 pub ptr: *mut ::core::ffi::c_void,
135 pub short_big_int: i32,
136}
137#[allow(clippy::unnecessary_operation, clippy::identity_op)]
138const _: () = {
139 ["Size of JSValueUnion"][::core::mem::size_of::<JSValueUnion>() - 8usize];
140 ["Alignment of JSValueUnion"][::core::mem::align_of::<JSValueUnion>() - 8usize];
141 ["Offset of field: JSValueUnion::int32"][::core::mem::offset_of!(JSValueUnion, int32) - 0usize];
142 ["Offset of field: JSValueUnion::float64"]
143 [::core::mem::offset_of!(JSValueUnion, float64) - 0usize];
144 ["Offset of field: JSValueUnion::ptr"][::core::mem::offset_of!(JSValueUnion, ptr) - 0usize];
145 ["Offset of field: JSValueUnion::short_big_int"]
146 [::core::mem::offset_of!(JSValueUnion, short_big_int) - 0usize];
147};
148#[repr(C)]
149#[derive(Copy, Clone)]
150pub struct JSValue {
151 pub u: JSValueUnion,
152 pub tag: i64,
153}
154#[allow(clippy::unnecessary_operation, clippy::identity_op)]
155const _: () = {
156 ["Size of JSValue"][::core::mem::size_of::<JSValue>() - 16usize];
157 ["Alignment of JSValue"][::core::mem::align_of::<JSValue>() - 8usize];
158 ["Offset of field: JSValue::u"][::core::mem::offset_of!(JSValue, u) - 0usize];
159 ["Offset of field: JSValue::tag"][::core::mem::offset_of!(JSValue, tag) - 8usize];
160};
161pub type JSCFunction = ::core::option::Option<
162 unsafe extern "C" fn(
163 ctx: *mut JSContext,
164 this_val: JSValue,
165 argc: ::core::ffi::c_int,
166 argv: *mut JSValue,
167 ) -> JSValue,
168>;
169pub type JSCFunctionMagic = ::core::option::Option<
170 unsafe extern "C" fn(
171 ctx: *mut JSContext,
172 this_val: JSValue,
173 argc: ::core::ffi::c_int,
174 argv: *mut JSValue,
175 magic: ::core::ffi::c_int,
176 ) -> JSValue,
177>;
178pub type JSCFunctionData = ::core::option::Option<
179 unsafe extern "C" fn(
180 ctx: *mut JSContext,
181 this_val: JSValue,
182 argc: ::core::ffi::c_int,
183 argv: *mut JSValue,
184 magic: ::core::ffi::c_int,
185 func_data: *mut JSValue,
186 ) -> JSValue,
187>;
188pub type JSCClosure = ::core::option::Option<
189 unsafe extern "C" fn(
190 ctx: *mut JSContext,
191 this_val: JSValue,
192 argc: ::core::ffi::c_int,
193 argv: *mut JSValue,
194 magic: ::core::ffi::c_int,
195 opaque: *mut ::core::ffi::c_void,
196 ) -> JSValue,
197>;
198#[repr(C)]
199#[derive(Debug, Copy, Clone)]
200pub struct JSMallocFunctions {
201 pub js_calloc: ::core::option::Option<
202 unsafe extern "C" fn(
203 opaque: *mut ::core::ffi::c_void,
204 count: size_t,
205 size: size_t,
206 ) -> *mut ::core::ffi::c_void,
207 >,
208 pub js_malloc: ::core::option::Option<
209 unsafe extern "C" fn(
210 opaque: *mut ::core::ffi::c_void,
211 size: size_t,
212 ) -> *mut ::core::ffi::c_void,
213 >,
214 pub js_free: ::core::option::Option<
215 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
216 >,
217 pub js_realloc: ::core::option::Option<
218 unsafe extern "C" fn(
219 opaque: *mut ::core::ffi::c_void,
220 ptr: *mut ::core::ffi::c_void,
221 size: size_t,
222 ) -> *mut ::core::ffi::c_void,
223 >,
224 pub js_malloc_usable_size:
225 ::core::option::Option<unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> size_t>,
226}
227#[allow(clippy::unnecessary_operation, clippy::identity_op)]
228const _: () = {
229 ["Size of JSMallocFunctions"][::core::mem::size_of::<JSMallocFunctions>() - 40usize];
230 ["Alignment of JSMallocFunctions"][::core::mem::align_of::<JSMallocFunctions>() - 8usize];
231 ["Offset of field: JSMallocFunctions::js_calloc"]
232 [::core::mem::offset_of!(JSMallocFunctions, js_calloc) - 0usize];
233 ["Offset of field: JSMallocFunctions::js_malloc"]
234 [::core::mem::offset_of!(JSMallocFunctions, js_malloc) - 8usize];
235 ["Offset of field: JSMallocFunctions::js_free"]
236 [::core::mem::offset_of!(JSMallocFunctions, js_free) - 16usize];
237 ["Offset of field: JSMallocFunctions::js_realloc"]
238 [::core::mem::offset_of!(JSMallocFunctions, js_realloc) - 24usize];
239 ["Offset of field: JSMallocFunctions::js_malloc_usable_size"]
240 [::core::mem::offset_of!(JSMallocFunctions, js_malloc_usable_size) - 32usize];
241};
242pub type JSRuntimeFinalizer =
243 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, arg: *mut ::core::ffi::c_void)>;
244#[repr(C)]
245#[derive(Debug, Copy, Clone)]
246pub struct JSGCObjectHeader {
247 _unused: [u8; 0],
248}
249unsafe extern "C" {
250 pub fn JS_NewRuntime() -> *mut JSRuntime;
251}
252unsafe extern "C" {
253 pub fn JS_SetRuntimeInfo(rt: *mut JSRuntime, info: *const ::core::ffi::c_char);
254}
255unsafe extern "C" {
256 pub fn JS_SetMemoryLimit(rt: *mut JSRuntime, limit: size_t);
257}
258unsafe extern "C" {
259 pub fn JS_SetDumpFlags(rt: *mut JSRuntime, flags: u64);
260}
261unsafe extern "C" {
262 pub fn JS_GetDumpFlags(rt: *mut JSRuntime) -> u64;
263}
264unsafe extern "C" {
265 pub fn JS_GetGCThreshold(rt: *mut JSRuntime) -> size_t;
266}
267unsafe extern "C" {
268 pub fn JS_SetGCThreshold(rt: *mut JSRuntime, gc_threshold: size_t);
269}
270unsafe extern "C" {
271 pub fn JS_SetMaxStackSize(rt: *mut JSRuntime, stack_size: size_t);
272}
273unsafe extern "C" {
274 pub fn JS_UpdateStackTop(rt: *mut JSRuntime);
275}
276unsafe extern "C" {
277 pub fn JS_NewRuntime2(
278 mf: *const JSMallocFunctions,
279 opaque: *mut ::core::ffi::c_void,
280 ) -> *mut JSRuntime;
281}
282unsafe extern "C" {
283 pub fn JS_FreeRuntime(rt: *mut JSRuntime);
284}
285unsafe extern "C" {
286 pub fn JS_GetRuntimeOpaque(rt: *mut JSRuntime) -> *mut ::core::ffi::c_void;
287}
288unsafe extern "C" {
289 pub fn JS_SetRuntimeOpaque(rt: *mut JSRuntime, opaque: *mut ::core::ffi::c_void);
290}
291unsafe extern "C" {
292 pub fn JS_AddRuntimeFinalizer(
293 rt: *mut JSRuntime,
294 finalizer: JSRuntimeFinalizer,
295 arg: *mut ::core::ffi::c_void,
296 ) -> ::core::ffi::c_int;
297}
298pub type JS_MarkFunc =
299 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, gp: *mut JSGCObjectHeader)>;
300unsafe extern "C" {
301 pub fn JS_MarkValue(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc);
302}
303unsafe extern "C" {
304 pub fn JS_RunGC(rt: *mut JSRuntime);
305}
306unsafe extern "C" {
307 pub fn JS_IsLiveObject(rt: *mut JSRuntime, obj: JSValue) -> bool;
308}
309unsafe extern "C" {
310 pub fn JS_NewContext(rt: *mut JSRuntime) -> *mut JSContext;
311}
312unsafe extern "C" {
313 pub fn JS_FreeContext(s: *mut JSContext);
314}
315unsafe extern "C" {
316 pub fn JS_DupContext(ctx: *mut JSContext) -> *mut JSContext;
317}
318unsafe extern "C" {
319 pub fn JS_GetContextOpaque(ctx: *mut JSContext) -> *mut ::core::ffi::c_void;
320}
321unsafe extern "C" {
322 pub fn JS_SetContextOpaque(ctx: *mut JSContext, opaque: *mut ::core::ffi::c_void);
323}
324unsafe extern "C" {
325 pub fn JS_GetRuntime(ctx: *mut JSContext) -> *mut JSRuntime;
326}
327unsafe extern "C" {
328 pub fn JS_SetClassProto(ctx: *mut JSContext, class_id: JSClassID, obj: JSValue);
329}
330unsafe extern "C" {
331 pub fn JS_GetClassProto(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
332}
333unsafe extern "C" {
334 pub fn JS_GetFunctionProto(ctx: *mut JSContext) -> JSValue;
335}
336unsafe extern "C" {
337 pub fn JS_NewContextRaw(rt: *mut JSRuntime) -> *mut JSContext;
338}
339unsafe extern "C" {
340 pub fn JS_AddIntrinsicBaseObjects(ctx: *mut JSContext) -> ::core::ffi::c_int;
341}
342unsafe extern "C" {
343 pub fn JS_AddIntrinsicDate(ctx: *mut JSContext) -> ::core::ffi::c_int;
344}
345unsafe extern "C" {
346 pub fn JS_AddIntrinsicEval(ctx: *mut JSContext) -> ::core::ffi::c_int;
347}
348unsafe extern "C" {
349 pub fn JS_AddIntrinsicRegExpCompiler(ctx: *mut JSContext);
350}
351unsafe extern "C" {
352 pub fn JS_AddIntrinsicRegExp(ctx: *mut JSContext) -> ::core::ffi::c_int;
353}
354unsafe extern "C" {
355 pub fn JS_AddIntrinsicJSON(ctx: *mut JSContext) -> ::core::ffi::c_int;
356}
357unsafe extern "C" {
358 pub fn JS_AddIntrinsicProxy(ctx: *mut JSContext) -> ::core::ffi::c_int;
359}
360unsafe extern "C" {
361 pub fn JS_AddIntrinsicMapSet(ctx: *mut JSContext) -> ::core::ffi::c_int;
362}
363unsafe extern "C" {
364 pub fn JS_AddIntrinsicTypedArrays(ctx: *mut JSContext) -> ::core::ffi::c_int;
365}
366unsafe extern "C" {
367 pub fn JS_AddIntrinsicPromise(ctx: *mut JSContext) -> ::core::ffi::c_int;
368}
369unsafe extern "C" {
370 pub fn JS_AddIntrinsicBigInt(ctx: *mut JSContext) -> ::core::ffi::c_int;
371}
372unsafe extern "C" {
373 pub fn JS_AddIntrinsicWeakRef(ctx: *mut JSContext) -> ::core::ffi::c_int;
374}
375unsafe extern "C" {
376 pub fn JS_AddPerformance(ctx: *mut JSContext) -> ::core::ffi::c_int;
377}
378unsafe extern "C" {
379 pub fn JS_AddIntrinsicDOMException(ctx: *mut JSContext) -> ::core::ffi::c_int;
380}
381unsafe extern "C" {
382 pub fn JS_AddIntrinsicAToB(ctx: *mut JSContext) -> ::core::ffi::c_int;
383}
384unsafe extern "C" {
385 pub fn JS_IsEqual(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> ::core::ffi::c_int;
386}
387unsafe extern "C" {
388 pub fn JS_IsStrictEqual(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
389}
390unsafe extern "C" {
391 pub fn JS_IsSameValue(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
392}
393unsafe extern "C" {
394 pub fn JS_IsSameValueZero(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
395}
396unsafe extern "C" {
397 pub fn js_string_codePointRange(
398 ctx: *mut JSContext,
399 this_val: JSValue,
400 argc: ::core::ffi::c_int,
401 argv: *mut JSValue,
402 ) -> JSValue;
403}
404unsafe extern "C" {
405 pub fn js_calloc_rt(
406 rt: *mut JSRuntime,
407 count: size_t,
408 size: size_t,
409 ) -> *mut ::core::ffi::c_void;
410}
411unsafe extern "C" {
412 pub fn js_malloc_rt(rt: *mut JSRuntime, size: size_t) -> *mut ::core::ffi::c_void;
413}
414unsafe extern "C" {
415 pub fn js_free_rt(rt: *mut JSRuntime, ptr: *mut ::core::ffi::c_void);
416}
417unsafe extern "C" {
418 pub fn js_realloc_rt(
419 rt: *mut JSRuntime,
420 ptr: *mut ::core::ffi::c_void,
421 size: size_t,
422 ) -> *mut ::core::ffi::c_void;
423}
424unsafe extern "C" {
425 pub fn js_malloc_usable_size_rt(rt: *mut JSRuntime, ptr: *const ::core::ffi::c_void) -> size_t;
426}
427unsafe extern "C" {
428 pub fn js_mallocz_rt(rt: *mut JSRuntime, size: size_t) -> *mut ::core::ffi::c_void;
429}
430unsafe extern "C" {
431 pub fn js_calloc(ctx: *mut JSContext, count: size_t, size: size_t) -> *mut ::core::ffi::c_void;
432}
433unsafe extern "C" {
434 pub fn js_malloc(ctx: *mut JSContext, size: size_t) -> *mut ::core::ffi::c_void;
435}
436unsafe extern "C" {
437 pub fn js_free(ctx: *mut JSContext, ptr: *mut ::core::ffi::c_void);
438}
439unsafe extern "C" {
440 pub fn js_realloc(
441 ctx: *mut JSContext,
442 ptr: *mut ::core::ffi::c_void,
443 size: size_t,
444 ) -> *mut ::core::ffi::c_void;
445}
446unsafe extern "C" {
447 pub fn js_malloc_usable_size(ctx: *mut JSContext, ptr: *const ::core::ffi::c_void) -> size_t;
448}
449unsafe extern "C" {
450 pub fn js_realloc2(
451 ctx: *mut JSContext,
452 ptr: *mut ::core::ffi::c_void,
453 size: size_t,
454 pslack: *mut size_t,
455 ) -> *mut ::core::ffi::c_void;
456}
457unsafe extern "C" {
458 pub fn js_mallocz(ctx: *mut JSContext, size: size_t) -> *mut ::core::ffi::c_void;
459}
460unsafe extern "C" {
461 pub fn js_strdup(
462 ctx: *mut JSContext,
463 str_: *const ::core::ffi::c_char,
464 ) -> *mut ::core::ffi::c_char;
465}
466unsafe extern "C" {
467 pub fn js_strndup(
468 ctx: *mut JSContext,
469 s: *const ::core::ffi::c_char,
470 n: size_t,
471 ) -> *mut ::core::ffi::c_char;
472}
473#[repr(C)]
474#[derive(Debug, Copy, Clone)]
475pub struct JSMemoryUsage {
476 pub malloc_size: i64,
477 pub malloc_limit: i64,
478 pub memory_used_size: i64,
479 pub malloc_count: i64,
480 pub memory_used_count: i64,
481 pub atom_count: i64,
482 pub atom_size: i64,
483 pub str_count: i64,
484 pub str_size: i64,
485 pub obj_count: i64,
486 pub obj_size: i64,
487 pub prop_count: i64,
488 pub prop_size: i64,
489 pub shape_count: i64,
490 pub shape_size: i64,
491 pub js_func_count: i64,
492 pub js_func_size: i64,
493 pub js_func_code_size: i64,
494 pub js_func_pc2line_count: i64,
495 pub js_func_pc2line_size: i64,
496 pub c_func_count: i64,
497 pub array_count: i64,
498 pub fast_array_count: i64,
499 pub fast_array_elements: i64,
500 pub binary_object_count: i64,
501 pub binary_object_size: i64,
502}
503#[allow(clippy::unnecessary_operation, clippy::identity_op)]
504const _: () = {
505 ["Size of JSMemoryUsage"][::core::mem::size_of::<JSMemoryUsage>() - 208usize];
506 ["Alignment of JSMemoryUsage"][::core::mem::align_of::<JSMemoryUsage>() - 8usize];
507 ["Offset of field: JSMemoryUsage::malloc_size"]
508 [::core::mem::offset_of!(JSMemoryUsage, malloc_size) - 0usize];
509 ["Offset of field: JSMemoryUsage::malloc_limit"]
510 [::core::mem::offset_of!(JSMemoryUsage, malloc_limit) - 8usize];
511 ["Offset of field: JSMemoryUsage::memory_used_size"]
512 [::core::mem::offset_of!(JSMemoryUsage, memory_used_size) - 16usize];
513 ["Offset of field: JSMemoryUsage::malloc_count"]
514 [::core::mem::offset_of!(JSMemoryUsage, malloc_count) - 24usize];
515 ["Offset of field: JSMemoryUsage::memory_used_count"]
516 [::core::mem::offset_of!(JSMemoryUsage, memory_used_count) - 32usize];
517 ["Offset of field: JSMemoryUsage::atom_count"]
518 [::core::mem::offset_of!(JSMemoryUsage, atom_count) - 40usize];
519 ["Offset of field: JSMemoryUsage::atom_size"]
520 [::core::mem::offset_of!(JSMemoryUsage, atom_size) - 48usize];
521 ["Offset of field: JSMemoryUsage::str_count"]
522 [::core::mem::offset_of!(JSMemoryUsage, str_count) - 56usize];
523 ["Offset of field: JSMemoryUsage::str_size"]
524 [::core::mem::offset_of!(JSMemoryUsage, str_size) - 64usize];
525 ["Offset of field: JSMemoryUsage::obj_count"]
526 [::core::mem::offset_of!(JSMemoryUsage, obj_count) - 72usize];
527 ["Offset of field: JSMemoryUsage::obj_size"]
528 [::core::mem::offset_of!(JSMemoryUsage, obj_size) - 80usize];
529 ["Offset of field: JSMemoryUsage::prop_count"]
530 [::core::mem::offset_of!(JSMemoryUsage, prop_count) - 88usize];
531 ["Offset of field: JSMemoryUsage::prop_size"]
532 [::core::mem::offset_of!(JSMemoryUsage, prop_size) - 96usize];
533 ["Offset of field: JSMemoryUsage::shape_count"]
534 [::core::mem::offset_of!(JSMemoryUsage, shape_count) - 104usize];
535 ["Offset of field: JSMemoryUsage::shape_size"]
536 [::core::mem::offset_of!(JSMemoryUsage, shape_size) - 112usize];
537 ["Offset of field: JSMemoryUsage::js_func_count"]
538 [::core::mem::offset_of!(JSMemoryUsage, js_func_count) - 120usize];
539 ["Offset of field: JSMemoryUsage::js_func_size"]
540 [::core::mem::offset_of!(JSMemoryUsage, js_func_size) - 128usize];
541 ["Offset of field: JSMemoryUsage::js_func_code_size"]
542 [::core::mem::offset_of!(JSMemoryUsage, js_func_code_size) - 136usize];
543 ["Offset of field: JSMemoryUsage::js_func_pc2line_count"]
544 [::core::mem::offset_of!(JSMemoryUsage, js_func_pc2line_count) - 144usize];
545 ["Offset of field: JSMemoryUsage::js_func_pc2line_size"]
546 [::core::mem::offset_of!(JSMemoryUsage, js_func_pc2line_size) - 152usize];
547 ["Offset of field: JSMemoryUsage::c_func_count"]
548 [::core::mem::offset_of!(JSMemoryUsage, c_func_count) - 160usize];
549 ["Offset of field: JSMemoryUsage::array_count"]
550 [::core::mem::offset_of!(JSMemoryUsage, array_count) - 168usize];
551 ["Offset of field: JSMemoryUsage::fast_array_count"]
552 [::core::mem::offset_of!(JSMemoryUsage, fast_array_count) - 176usize];
553 ["Offset of field: JSMemoryUsage::fast_array_elements"]
554 [::core::mem::offset_of!(JSMemoryUsage, fast_array_elements) - 184usize];
555 ["Offset of field: JSMemoryUsage::binary_object_count"]
556 [::core::mem::offset_of!(JSMemoryUsage, binary_object_count) - 192usize];
557 ["Offset of field: JSMemoryUsage::binary_object_size"]
558 [::core::mem::offset_of!(JSMemoryUsage, binary_object_size) - 200usize];
559};
560unsafe extern "C" {
561 pub fn JS_ComputeMemoryUsage(rt: *mut JSRuntime, s: *mut JSMemoryUsage);
562}
563unsafe extern "C" {
564 pub fn JS_NewAtomLen(
565 ctx: *mut JSContext,
566 str_: *const ::core::ffi::c_char,
567 len: size_t,
568 ) -> JSAtom;
569}
570unsafe extern "C" {
571 pub fn JS_NewAtom(ctx: *mut JSContext, str_: *const ::core::ffi::c_char) -> JSAtom;
572}
573unsafe extern "C" {
574 pub fn JS_NewAtomUInt32(ctx: *mut JSContext, n: u32) -> JSAtom;
575}
576unsafe extern "C" {
577 pub fn JS_DupAtom(ctx: *mut JSContext, v: JSAtom) -> JSAtom;
578}
579unsafe extern "C" {
580 pub fn JS_DupAtomRT(rt: *mut JSRuntime, v: JSAtom) -> JSAtom;
581}
582unsafe extern "C" {
583 pub fn JS_FreeAtom(ctx: *mut JSContext, v: JSAtom);
584}
585unsafe extern "C" {
586 pub fn JS_FreeAtomRT(rt: *mut JSRuntime, v: JSAtom);
587}
588unsafe extern "C" {
589 pub fn JS_AtomToValue(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
590}
591unsafe extern "C" {
592 pub fn JS_AtomToString(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
593}
594unsafe extern "C" {
595 pub fn JS_AtomToCStringLen(
596 ctx: *mut JSContext,
597 plen: *mut size_t,
598 atom: JSAtom,
599 ) -> *const ::core::ffi::c_char;
600}
601unsafe extern "C" {
602 pub fn JS_ValueToAtom(ctx: *mut JSContext, val: JSValue) -> JSAtom;
603}
604#[repr(C)]
605#[derive(Debug, Copy, Clone)]
606pub struct JSPropertyEnum {
607 pub is_enumerable: bool,
608 pub atom: JSAtom,
609}
610#[allow(clippy::unnecessary_operation, clippy::identity_op)]
611const _: () = {
612 ["Size of JSPropertyEnum"][::core::mem::size_of::<JSPropertyEnum>() - 8usize];
613 ["Alignment of JSPropertyEnum"][::core::mem::align_of::<JSPropertyEnum>() - 4usize];
614 ["Offset of field: JSPropertyEnum::is_enumerable"]
615 [::core::mem::offset_of!(JSPropertyEnum, is_enumerable) - 0usize];
616 ["Offset of field: JSPropertyEnum::atom"]
617 [::core::mem::offset_of!(JSPropertyEnum, atom) - 4usize];
618};
619#[repr(C)]
620#[derive(Copy, Clone)]
621pub struct JSPropertyDescriptor {
622 pub flags: ::core::ffi::c_int,
623 pub value: JSValue,
624 pub getter: JSValue,
625 pub setter: JSValue,
626}
627#[allow(clippy::unnecessary_operation, clippy::identity_op)]
628const _: () = {
629 ["Size of JSPropertyDescriptor"][::core::mem::size_of::<JSPropertyDescriptor>() - 56usize];
630 ["Alignment of JSPropertyDescriptor"][::core::mem::align_of::<JSPropertyDescriptor>() - 8usize];
631 ["Offset of field: JSPropertyDescriptor::flags"]
632 [::core::mem::offset_of!(JSPropertyDescriptor, flags) - 0usize];
633 ["Offset of field: JSPropertyDescriptor::value"]
634 [::core::mem::offset_of!(JSPropertyDescriptor, value) - 8usize];
635 ["Offset of field: JSPropertyDescriptor::getter"]
636 [::core::mem::offset_of!(JSPropertyDescriptor, getter) - 24usize];
637 ["Offset of field: JSPropertyDescriptor::setter"]
638 [::core::mem::offset_of!(JSPropertyDescriptor, setter) - 40usize];
639};
640#[repr(C)]
641#[derive(Debug, Copy, Clone)]
642pub struct JSClassExoticMethods {
643 pub get_own_property: ::core::option::Option<
644 unsafe extern "C" fn(
645 ctx: *mut JSContext,
646 desc: *mut JSPropertyDescriptor,
647 obj: JSValue,
648 prop: JSAtom,
649 ) -> ::core::ffi::c_int,
650 >,
651 pub get_own_property_names: ::core::option::Option<
652 unsafe extern "C" fn(
653 ctx: *mut JSContext,
654 ptab: *mut *mut JSPropertyEnum,
655 plen: *mut u32,
656 obj: JSValue,
657 ) -> ::core::ffi::c_int,
658 >,
659 pub delete_property: ::core::option::Option<
660 unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue, prop: JSAtom) -> ::core::ffi::c_int,
661 >,
662 pub define_own_property: ::core::option::Option<
663 unsafe extern "C" fn(
664 ctx: *mut JSContext,
665 this_obj: JSValue,
666 prop: JSAtom,
667 val: JSValue,
668 getter: JSValue,
669 setter: JSValue,
670 flags: ::core::ffi::c_int,
671 ) -> ::core::ffi::c_int,
672 >,
673 pub has_property: ::core::option::Option<
674 unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue, atom: JSAtom) -> ::core::ffi::c_int,
675 >,
676 pub get_property: ::core::option::Option<
677 unsafe extern "C" fn(
678 ctx: *mut JSContext,
679 obj: JSValue,
680 atom: JSAtom,
681 receiver: JSValue,
682 ) -> JSValue,
683 >,
684 pub set_property: ::core::option::Option<
685 unsafe extern "C" fn(
686 ctx: *mut JSContext,
687 obj: JSValue,
688 atom: JSAtom,
689 value: JSValue,
690 receiver: JSValue,
691 flags: ::core::ffi::c_int,
692 ) -> ::core::ffi::c_int,
693 >,
694}
695#[allow(clippy::unnecessary_operation, clippy::identity_op)]
696const _: () = {
697 ["Size of JSClassExoticMethods"][::core::mem::size_of::<JSClassExoticMethods>() - 56usize];
698 ["Alignment of JSClassExoticMethods"][::core::mem::align_of::<JSClassExoticMethods>() - 8usize];
699 ["Offset of field: JSClassExoticMethods::get_own_property"]
700 [::core::mem::offset_of!(JSClassExoticMethods, get_own_property) - 0usize];
701 ["Offset of field: JSClassExoticMethods::get_own_property_names"]
702 [::core::mem::offset_of!(JSClassExoticMethods, get_own_property_names) - 8usize];
703 ["Offset of field: JSClassExoticMethods::delete_property"]
704 [::core::mem::offset_of!(JSClassExoticMethods, delete_property) - 16usize];
705 ["Offset of field: JSClassExoticMethods::define_own_property"]
706 [::core::mem::offset_of!(JSClassExoticMethods, define_own_property) - 24usize];
707 ["Offset of field: JSClassExoticMethods::has_property"]
708 [::core::mem::offset_of!(JSClassExoticMethods, has_property) - 32usize];
709 ["Offset of field: JSClassExoticMethods::get_property"]
710 [::core::mem::offset_of!(JSClassExoticMethods, get_property) - 40usize];
711 ["Offset of field: JSClassExoticMethods::set_property"]
712 [::core::mem::offset_of!(JSClassExoticMethods, set_property) - 48usize];
713};
714pub type JSClassFinalizer =
715 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue)>;
716pub type JSClassGCMark = ::core::option::Option<
717 unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc),
718>;
719pub type JSClassCall = ::core::option::Option<
720 unsafe extern "C" fn(
721 ctx: *mut JSContext,
722 func_obj: JSValue,
723 this_val: JSValue,
724 argc: ::core::ffi::c_int,
725 argv: *mut JSValue,
726 flags: ::core::ffi::c_int,
727 ) -> JSValue,
728>;
729#[repr(C)]
730#[derive(Debug, Copy, Clone)]
731pub struct JSClassDef {
732 pub class_name: *const ::core::ffi::c_char,
733 pub finalizer: JSClassFinalizer,
734 pub gc_mark: JSClassGCMark,
735 pub call: JSClassCall,
736 pub exotic: *mut JSClassExoticMethods,
737}
738#[allow(clippy::unnecessary_operation, clippy::identity_op)]
739const _: () = {
740 ["Size of JSClassDef"][::core::mem::size_of::<JSClassDef>() - 40usize];
741 ["Alignment of JSClassDef"][::core::mem::align_of::<JSClassDef>() - 8usize];
742 ["Offset of field: JSClassDef::class_name"]
743 [::core::mem::offset_of!(JSClassDef, class_name) - 0usize];
744 ["Offset of field: JSClassDef::finalizer"]
745 [::core::mem::offset_of!(JSClassDef, finalizer) - 8usize];
746 ["Offset of field: JSClassDef::gc_mark"]
747 [::core::mem::offset_of!(JSClassDef, gc_mark) - 16usize];
748 ["Offset of field: JSClassDef::call"][::core::mem::offset_of!(JSClassDef, call) - 24usize];
749 ["Offset of field: JSClassDef::exotic"][::core::mem::offset_of!(JSClassDef, exotic) - 32usize];
750};
751#[repr(C)]
752#[derive(Debug, Copy, Clone)]
753pub struct JSEvalOptions {
754 pub version: ::core::ffi::c_int,
755 pub eval_flags: ::core::ffi::c_int,
756 pub filename: *const ::core::ffi::c_char,
757 pub line_num: ::core::ffi::c_int,
758}
759#[allow(clippy::unnecessary_operation, clippy::identity_op)]
760const _: () = {
761 ["Size of JSEvalOptions"][::core::mem::size_of::<JSEvalOptions>() - 24usize];
762 ["Alignment of JSEvalOptions"][::core::mem::align_of::<JSEvalOptions>() - 8usize];
763 ["Offset of field: JSEvalOptions::version"]
764 [::core::mem::offset_of!(JSEvalOptions, version) - 0usize];
765 ["Offset of field: JSEvalOptions::eval_flags"]
766 [::core::mem::offset_of!(JSEvalOptions, eval_flags) - 4usize];
767 ["Offset of field: JSEvalOptions::filename"]
768 [::core::mem::offset_of!(JSEvalOptions, filename) - 8usize];
769 ["Offset of field: JSEvalOptions::line_num"]
770 [::core::mem::offset_of!(JSEvalOptions, line_num) - 16usize];
771};
772unsafe extern "C" {
773 pub fn JS_NewClassID(rt: *mut JSRuntime, pclass_id: *mut JSClassID) -> JSClassID;
774}
775unsafe extern "C" {
776 pub fn JS_GetClassID(v: JSValue) -> JSClassID;
777}
778unsafe extern "C" {
779 pub fn JS_NewClass(
780 rt: *mut JSRuntime,
781 class_id: JSClassID,
782 class_def: *const JSClassDef,
783 ) -> ::core::ffi::c_int;
784}
785unsafe extern "C" {
786 pub fn JS_IsRegisteredClass(rt: *mut JSRuntime, class_id: JSClassID) -> bool;
787}
788unsafe extern "C" {
789 pub fn JS_GetClassName(rt: *mut JSRuntime, class_id: JSClassID) -> JSAtom;
790}
791unsafe extern "C" {
792 pub fn JS_NewNumber(ctx: *mut JSContext, d: f64) -> JSValue;
793}
794unsafe extern "C" {
795 pub fn JS_NewBigInt64(ctx: *mut JSContext, v: i64) -> JSValue;
796}
797unsafe extern "C" {
798 pub fn JS_NewBigUint64(ctx: *mut JSContext, v: u64) -> JSValue;
799}
800unsafe extern "C" {
801 pub fn JS_Throw(ctx: *mut JSContext, obj: JSValue) -> JSValue;
802}
803unsafe extern "C" {
804 pub fn JS_GetException(ctx: *mut JSContext) -> JSValue;
805}
806unsafe extern "C" {
807 pub fn JS_HasException(ctx: *mut JSContext) -> bool;
808}
809unsafe extern "C" {
810 pub fn JS_IsError(val: JSValue) -> bool;
811}
812unsafe extern "C" {
813 pub fn JS_IsUncatchableError(val: JSValue) -> bool;
814}
815unsafe extern "C" {
816 pub fn JS_SetUncatchableError(ctx: *mut JSContext, val: JSValue);
817}
818unsafe extern "C" {
819 pub fn JS_ClearUncatchableError(ctx: *mut JSContext, val: JSValue);
820}
821unsafe extern "C" {
822 pub fn JS_ResetUncatchableError(ctx: *mut JSContext);
823}
824unsafe extern "C" {
825 pub fn JS_NewError(ctx: *mut JSContext) -> JSValue;
826}
827unsafe extern "C" {
828 pub fn JS_NewInternalError(
829 ctx: *mut JSContext,
830 fmt: *const ::core::ffi::c_char,
831 ...
832 ) -> JSValue;
833}
834unsafe extern "C" {
835 pub fn JS_NewPlainError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
836}
837unsafe extern "C" {
838 pub fn JS_NewRangeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
839}
840unsafe extern "C" {
841 pub fn JS_NewReferenceError(
842 ctx: *mut JSContext,
843 fmt: *const ::core::ffi::c_char,
844 ...
845 ) -> JSValue;
846}
847unsafe extern "C" {
848 pub fn JS_NewSyntaxError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
849}
850unsafe extern "C" {
851 pub fn JS_NewTypeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
852}
853unsafe extern "C" {
854 pub fn JS_ThrowInternalError(
855 ctx: *mut JSContext,
856 fmt: *const ::core::ffi::c_char,
857 ...
858 ) -> JSValue;
859}
860unsafe extern "C" {
861 pub fn JS_ThrowPlainError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...)
862 -> JSValue;
863}
864unsafe extern "C" {
865 pub fn JS_ThrowRangeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...)
866 -> JSValue;
867}
868unsafe extern "C" {
869 pub fn JS_ThrowReferenceError(
870 ctx: *mut JSContext,
871 fmt: *const ::core::ffi::c_char,
872 ...
873 ) -> JSValue;
874}
875unsafe extern "C" {
876 pub fn JS_ThrowSyntaxError(
877 ctx: *mut JSContext,
878 fmt: *const ::core::ffi::c_char,
879 ...
880 ) -> JSValue;
881}
882unsafe extern "C" {
883 pub fn JS_ThrowTypeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
884}
885unsafe extern "C" {
886 pub fn JS_ThrowDOMException(
887 ctx: *mut JSContext,
888 name: *const ::core::ffi::c_char,
889 fmt: *const ::core::ffi::c_char,
890 ...
891 ) -> JSValue;
892}
893unsafe extern "C" {
894 pub fn JS_ThrowOutOfMemory(ctx: *mut JSContext) -> JSValue;
895}
896unsafe extern "C" {
897 pub fn JS_FreeValue(ctx: *mut JSContext, v: JSValue);
898}
899unsafe extern "C" {
900 pub fn JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
901}
902unsafe extern "C" {
903 pub fn JS_DupValue(ctx: *mut JSContext, v: JSValue) -> JSValue;
904}
905unsafe extern "C" {
906 pub fn JS_DupValueRT(rt: *mut JSRuntime, v: JSValue) -> JSValue;
907}
908unsafe extern "C" {
909 pub fn JS_ToBool(ctx: *mut JSContext, val: JSValue) -> ::core::ffi::c_int;
910}
911unsafe extern "C" {
912 pub fn JS_ToNumber(ctx: *mut JSContext, val: JSValue) -> JSValue;
913}
914unsafe extern "C" {
915 pub fn JS_ToInt32(ctx: *mut JSContext, pres: *mut i32, val: JSValue) -> ::core::ffi::c_int;
916}
917unsafe extern "C" {
918 pub fn JS_ToInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
919}
920unsafe extern "C" {
921 pub fn JS_ToIndex(ctx: *mut JSContext, plen: *mut u64, val: JSValue) -> ::core::ffi::c_int;
922}
923unsafe extern "C" {
924 pub fn JS_ToFloat64(ctx: *mut JSContext, pres: *mut f64, val: JSValue) -> ::core::ffi::c_int;
925}
926unsafe extern "C" {
927 pub fn JS_ToBigInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
928}
929unsafe extern "C" {
930 pub fn JS_ToBigUint64(ctx: *mut JSContext, pres: *mut u64, val: JSValue) -> ::core::ffi::c_int;
931}
932unsafe extern "C" {
933 pub fn JS_ToInt64Ext(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
934}
935unsafe extern "C" {
936 pub fn JS_NewStringLen(
937 ctx: *mut JSContext,
938 str1: *const ::core::ffi::c_char,
939 len1: size_t,
940 ) -> JSValue;
941}
942unsafe extern "C" {
943 pub fn JS_NewStringUTF16(ctx: *mut JSContext, buf: *const u16, len: size_t) -> JSValue;
944}
945unsafe extern "C" {
946 pub fn JS_NewAtomString(ctx: *mut JSContext, str_: *const ::core::ffi::c_char) -> JSValue;
947}
948unsafe extern "C" {
949 pub fn JS_ToString(ctx: *mut JSContext, val: JSValue) -> JSValue;
950}
951unsafe extern "C" {
952 pub fn JS_ToPropertyKey(ctx: *mut JSContext, val: JSValue) -> JSValue;
953}
954unsafe extern "C" {
955 pub fn JS_ToCStringLen2(
956 ctx: *mut JSContext,
957 plen: *mut size_t,
958 val1: JSValue,
959 cesu8: bool,
960 ) -> *const ::core::ffi::c_char;
961}
962unsafe extern "C" {
963 pub fn JS_ToCStringLenUTF16(
964 ctx: *mut JSContext,
965 plen: *mut size_t,
966 val1: JSValue,
967 ) -> *const u16;
968}
969unsafe extern "C" {
970 pub fn JS_FreeCString(ctx: *mut JSContext, ptr: *const ::core::ffi::c_char);
971}
972unsafe extern "C" {
973 pub fn JS_FreeCStringRT(rt: *mut JSRuntime, ptr: *const ::core::ffi::c_char);
974}
975unsafe extern "C" {
976 pub fn JS_FreeCStringUTF16(ctx: *mut JSContext, ptr: *const u16);
977}
978unsafe extern "C" {
979 pub fn JS_FreeCStringRT_UTF16(rt: *mut JSRuntime, ptr: *const u16);
980}
981unsafe extern "C" {
982 pub fn JS_NewObjectProtoClass(
983 ctx: *mut JSContext,
984 proto: JSValue,
985 class_id: JSClassID,
986 ) -> JSValue;
987}
988unsafe extern "C" {
989 pub fn JS_NewObjectClass(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
990}
991unsafe extern "C" {
992 pub fn JS_NewObjectProto(ctx: *mut JSContext, proto: JSValue) -> JSValue;
993}
994unsafe extern "C" {
995 pub fn JS_NewObject(ctx: *mut JSContext) -> JSValue;
996}
997unsafe extern "C" {
998 pub fn JS_NewObjectFrom(
999 ctx: *mut JSContext,
1000 count: ::core::ffi::c_int,
1001 props: *const JSAtom,
1002 values: *const JSValue,
1003 ) -> JSValue;
1004}
1005unsafe extern "C" {
1006 pub fn JS_NewObjectFromStr(
1007 ctx: *mut JSContext,
1008 count: ::core::ffi::c_int,
1009 props: *mut *const ::core::ffi::c_char,
1010 values: *const JSValue,
1011 ) -> JSValue;
1012}
1013unsafe extern "C" {
1014 pub fn JS_ToObject(ctx: *mut JSContext, val: JSValue) -> JSValue;
1015}
1016unsafe extern "C" {
1017 pub fn JS_ToObjectString(ctx: *mut JSContext, val: JSValue) -> JSValue;
1018}
1019unsafe extern "C" {
1020 pub fn JS_IsFunction(ctx: *mut JSContext, val: JSValue) -> bool;
1021}
1022unsafe extern "C" {
1023 pub fn JS_IsAsyncFunction(val: JSValue) -> bool;
1024}
1025unsafe extern "C" {
1026 pub fn JS_IsConstructor(ctx: *mut JSContext, val: JSValue) -> bool;
1027}
1028unsafe extern "C" {
1029 pub fn JS_SetConstructorBit(ctx: *mut JSContext, func_obj: JSValue, val: bool) -> bool;
1030}
1031unsafe extern "C" {
1032 pub fn JS_IsRegExp(val: JSValue) -> bool;
1033}
1034unsafe extern "C" {
1035 pub fn JS_IsMap(val: JSValue) -> bool;
1036}
1037unsafe extern "C" {
1038 pub fn JS_IsSet(val: JSValue) -> bool;
1039}
1040unsafe extern "C" {
1041 pub fn JS_IsWeakRef(val: JSValue) -> bool;
1042}
1043unsafe extern "C" {
1044 pub fn JS_IsWeakSet(val: JSValue) -> bool;
1045}
1046unsafe extern "C" {
1047 pub fn JS_IsWeakMap(val: JSValue) -> bool;
1048}
1049unsafe extern "C" {
1050 pub fn JS_IsDataView(val: JSValue) -> bool;
1051}
1052unsafe extern "C" {
1053 pub fn JS_NewArray(ctx: *mut JSContext) -> JSValue;
1054}
1055unsafe extern "C" {
1056 pub fn JS_NewArrayFrom(
1057 ctx: *mut JSContext,
1058 count: ::core::ffi::c_int,
1059 values: *const JSValue,
1060 ) -> JSValue;
1061}
1062unsafe extern "C" {
1063 pub fn JS_IsArray(val: JSValue) -> bool;
1064}
1065unsafe extern "C" {
1066 pub fn JS_IsProxy(val: JSValue) -> bool;
1067}
1068unsafe extern "C" {
1069 pub fn JS_GetProxyTarget(ctx: *mut JSContext, proxy: JSValue) -> JSValue;
1070}
1071unsafe extern "C" {
1072 pub fn JS_GetProxyHandler(ctx: *mut JSContext, proxy: JSValue) -> JSValue;
1073}
1074unsafe extern "C" {
1075 pub fn JS_NewProxy(ctx: *mut JSContext, target: JSValue, handler: JSValue) -> JSValue;
1076}
1077unsafe extern "C" {
1078 pub fn JS_NewDate(ctx: *mut JSContext, epoch_ms: f64) -> JSValue;
1079}
1080unsafe extern "C" {
1081 pub fn JS_IsDate(v: JSValue) -> bool;
1082}
1083unsafe extern "C" {
1084 pub fn JS_GetProperty(ctx: *mut JSContext, this_obj: JSValue, prop: JSAtom) -> JSValue;
1085}
1086unsafe extern "C" {
1087 pub fn JS_GetPropertyUint32(ctx: *mut JSContext, this_obj: JSValue, idx: u32) -> JSValue;
1088}
1089unsafe extern "C" {
1090 pub fn JS_GetPropertyInt64(ctx: *mut JSContext, this_obj: JSValue, idx: i64) -> JSValue;
1091}
1092unsafe extern "C" {
1093 pub fn JS_GetPropertyStr(
1094 ctx: *mut JSContext,
1095 this_obj: JSValue,
1096 prop: *const ::core::ffi::c_char,
1097 ) -> JSValue;
1098}
1099unsafe extern "C" {
1100 pub fn JS_SetProperty(
1101 ctx: *mut JSContext,
1102 this_obj: JSValue,
1103 prop: JSAtom,
1104 val: JSValue,
1105 ) -> ::core::ffi::c_int;
1106}
1107unsafe extern "C" {
1108 pub fn JS_SetPropertyUint32(
1109 ctx: *mut JSContext,
1110 this_obj: JSValue,
1111 idx: u32,
1112 val: JSValue,
1113 ) -> ::core::ffi::c_int;
1114}
1115unsafe extern "C" {
1116 pub fn JS_SetPropertyInt64(
1117 ctx: *mut JSContext,
1118 this_obj: JSValue,
1119 idx: i64,
1120 val: JSValue,
1121 ) -> ::core::ffi::c_int;
1122}
1123unsafe extern "C" {
1124 pub fn JS_SetPropertyStr(
1125 ctx: *mut JSContext,
1126 this_obj: JSValue,
1127 prop: *const ::core::ffi::c_char,
1128 val: JSValue,
1129 ) -> ::core::ffi::c_int;
1130}
1131unsafe extern "C" {
1132 pub fn JS_HasProperty(
1133 ctx: *mut JSContext,
1134 this_obj: JSValue,
1135 prop: JSAtom,
1136 ) -> ::core::ffi::c_int;
1137}
1138unsafe extern "C" {
1139 pub fn JS_IsExtensible(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1140}
1141unsafe extern "C" {
1142 pub fn JS_PreventExtensions(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1143}
1144unsafe extern "C" {
1145 pub fn JS_DeleteProperty(
1146 ctx: *mut JSContext,
1147 obj: JSValue,
1148 prop: JSAtom,
1149 flags: ::core::ffi::c_int,
1150 ) -> ::core::ffi::c_int;
1151}
1152unsafe extern "C" {
1153 pub fn JS_SetPrototype(
1154 ctx: *mut JSContext,
1155 obj: JSValue,
1156 proto_val: JSValue,
1157 ) -> ::core::ffi::c_int;
1158}
1159unsafe extern "C" {
1160 pub fn JS_GetPrototype(ctx: *mut JSContext, val: JSValue) -> JSValue;
1161}
1162unsafe extern "C" {
1163 pub fn JS_GetLength(ctx: *mut JSContext, obj: JSValue, pres: *mut i64) -> ::core::ffi::c_int;
1164}
1165unsafe extern "C" {
1166 pub fn JS_SetLength(ctx: *mut JSContext, obj: JSValue, len: i64) -> ::core::ffi::c_int;
1167}
1168unsafe extern "C" {
1169 pub fn JS_SealObject(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1170}
1171unsafe extern "C" {
1172 pub fn JS_FreezeObject(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1173}
1174unsafe extern "C" {
1175 pub fn JS_GetOwnPropertyNames(
1176 ctx: *mut JSContext,
1177 ptab: *mut *mut JSPropertyEnum,
1178 plen: *mut u32,
1179 obj: JSValue,
1180 flags: ::core::ffi::c_int,
1181 ) -> ::core::ffi::c_int;
1182}
1183unsafe extern "C" {
1184 pub fn JS_GetOwnProperty(
1185 ctx: *mut JSContext,
1186 desc: *mut JSPropertyDescriptor,
1187 obj: JSValue,
1188 prop: JSAtom,
1189 ) -> ::core::ffi::c_int;
1190}
1191unsafe extern "C" {
1192 pub fn JS_FreePropertyEnum(ctx: *mut JSContext, tab: *mut JSPropertyEnum, len: u32);
1193}
1194unsafe extern "C" {
1195 pub fn JS_Call(
1196 ctx: *mut JSContext,
1197 func_obj: JSValue,
1198 this_obj: JSValue,
1199 argc: ::core::ffi::c_int,
1200 argv: *mut JSValue,
1201 ) -> JSValue;
1202}
1203unsafe extern "C" {
1204 pub fn JS_Invoke(
1205 ctx: *mut JSContext,
1206 this_val: JSValue,
1207 atom: JSAtom,
1208 argc: ::core::ffi::c_int,
1209 argv: *mut JSValue,
1210 ) -> JSValue;
1211}
1212unsafe extern "C" {
1213 pub fn JS_CallConstructor(
1214 ctx: *mut JSContext,
1215 func_obj: JSValue,
1216 argc: ::core::ffi::c_int,
1217 argv: *mut JSValue,
1218 ) -> JSValue;
1219}
1220unsafe extern "C" {
1221 pub fn JS_CallConstructor2(
1222 ctx: *mut JSContext,
1223 func_obj: JSValue,
1224 new_target: JSValue,
1225 argc: ::core::ffi::c_int,
1226 argv: *mut JSValue,
1227 ) -> JSValue;
1228}
1229unsafe extern "C" {
1230 pub fn JS_DetectModule(input: *const ::core::ffi::c_char, input_len: size_t) -> bool;
1231}
1232unsafe extern "C" {
1233 pub fn JS_Eval(
1234 ctx: *mut JSContext,
1235 input: *const ::core::ffi::c_char,
1236 input_len: size_t,
1237 filename: *const ::core::ffi::c_char,
1238 eval_flags: ::core::ffi::c_int,
1239 ) -> JSValue;
1240}
1241unsafe extern "C" {
1242 pub fn JS_Eval2(
1243 ctx: *mut JSContext,
1244 input: *const ::core::ffi::c_char,
1245 input_len: size_t,
1246 options: *mut JSEvalOptions,
1247 ) -> JSValue;
1248}
1249unsafe extern "C" {
1250 pub fn JS_EvalThis(
1251 ctx: *mut JSContext,
1252 this_obj: JSValue,
1253 input: *const ::core::ffi::c_char,
1254 input_len: size_t,
1255 filename: *const ::core::ffi::c_char,
1256 eval_flags: ::core::ffi::c_int,
1257 ) -> JSValue;
1258}
1259unsafe extern "C" {
1260 pub fn JS_EvalThis2(
1261 ctx: *mut JSContext,
1262 this_obj: JSValue,
1263 input: *const ::core::ffi::c_char,
1264 input_len: size_t,
1265 options: *mut JSEvalOptions,
1266 ) -> JSValue;
1267}
1268unsafe extern "C" {
1269 pub fn JS_GetGlobalObject(ctx: *mut JSContext) -> JSValue;
1270}
1271unsafe extern "C" {
1272 pub fn JS_IsInstanceOf(ctx: *mut JSContext, val: JSValue, obj: JSValue) -> ::core::ffi::c_int;
1273}
1274unsafe extern "C" {
1275 pub fn JS_DefineProperty(
1276 ctx: *mut JSContext,
1277 this_obj: JSValue,
1278 prop: JSAtom,
1279 val: JSValue,
1280 getter: JSValue,
1281 setter: JSValue,
1282 flags: ::core::ffi::c_int,
1283 ) -> ::core::ffi::c_int;
1284}
1285unsafe extern "C" {
1286 pub fn JS_DefinePropertyValue(
1287 ctx: *mut JSContext,
1288 this_obj: JSValue,
1289 prop: JSAtom,
1290 val: JSValue,
1291 flags: ::core::ffi::c_int,
1292 ) -> ::core::ffi::c_int;
1293}
1294unsafe extern "C" {
1295 pub fn JS_DefinePropertyValueUint32(
1296 ctx: *mut JSContext,
1297 this_obj: JSValue,
1298 idx: u32,
1299 val: JSValue,
1300 flags: ::core::ffi::c_int,
1301 ) -> ::core::ffi::c_int;
1302}
1303unsafe extern "C" {
1304 pub fn JS_DefinePropertyValueStr(
1305 ctx: *mut JSContext,
1306 this_obj: JSValue,
1307 prop: *const ::core::ffi::c_char,
1308 val: JSValue,
1309 flags: ::core::ffi::c_int,
1310 ) -> ::core::ffi::c_int;
1311}
1312unsafe extern "C" {
1313 pub fn JS_DefinePropertyGetSet(
1314 ctx: *mut JSContext,
1315 this_obj: JSValue,
1316 prop: JSAtom,
1317 getter: JSValue,
1318 setter: JSValue,
1319 flags: ::core::ffi::c_int,
1320 ) -> ::core::ffi::c_int;
1321}
1322unsafe extern "C" {
1323 pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::core::ffi::c_void) -> ::core::ffi::c_int;
1324}
1325unsafe extern "C" {
1326 pub fn JS_GetOpaque(obj: JSValue, class_id: JSClassID) -> *mut ::core::ffi::c_void;
1327}
1328unsafe extern "C" {
1329 pub fn JS_GetOpaque2(
1330 ctx: *mut JSContext,
1331 obj: JSValue,
1332 class_id: JSClassID,
1333 ) -> *mut ::core::ffi::c_void;
1334}
1335unsafe extern "C" {
1336 pub fn JS_GetAnyOpaque(obj: JSValue, class_id: *mut JSClassID) -> *mut ::core::ffi::c_void;
1337}
1338unsafe extern "C" {
1339 pub fn JS_ParseJSON(
1340 ctx: *mut JSContext,
1341 buf: *const ::core::ffi::c_char,
1342 buf_len: size_t,
1343 filename: *const ::core::ffi::c_char,
1344 ) -> JSValue;
1345}
1346unsafe extern "C" {
1347 pub fn JS_JSONStringify(
1348 ctx: *mut JSContext,
1349 obj: JSValue,
1350 replacer: JSValue,
1351 space0: JSValue,
1352 ) -> JSValue;
1353}
1354pub type JSFreeArrayBufferDataFunc = ::core::option::Option<
1355 unsafe extern "C" fn(
1356 rt: *mut JSRuntime,
1357 opaque: *mut ::core::ffi::c_void,
1358 ptr: *mut ::core::ffi::c_void,
1359 ),
1360>;
1361unsafe extern "C" {
1362 pub fn JS_NewArrayBuffer(
1363 ctx: *mut JSContext,
1364 buf: *mut u8,
1365 len: size_t,
1366 free_func: JSFreeArrayBufferDataFunc,
1367 opaque: *mut ::core::ffi::c_void,
1368 is_shared: bool,
1369 ) -> JSValue;
1370}
1371unsafe extern "C" {
1372 pub fn JS_NewArrayBufferCopy(ctx: *mut JSContext, buf: *const u8, len: size_t) -> JSValue;
1373}
1374unsafe extern "C" {
1375 pub fn JS_DetachArrayBuffer(ctx: *mut JSContext, obj: JSValue);
1376}
1377unsafe extern "C" {
1378 pub fn JS_GetArrayBuffer(ctx: *mut JSContext, psize: *mut size_t, obj: JSValue) -> *mut u8;
1379}
1380unsafe extern "C" {
1381 pub fn JS_IsArrayBuffer(obj: JSValue) -> bool;
1382}
1383unsafe extern "C" {
1384 pub fn JS_IsImmutableArrayBuffer(obj: JSValue) -> ::core::ffi::c_int;
1385}
1386unsafe extern "C" {
1387 pub fn JS_SetImmutableArrayBuffer(obj: JSValue, immutable: bool) -> ::core::ffi::c_int;
1388}
1389unsafe extern "C" {
1390 pub fn JS_GetUint8Array(ctx: *mut JSContext, psize: *mut size_t, obj: JSValue) -> *mut u8;
1391}
1392pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8C: JSTypedArrayEnum = 0;
1393pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT8: JSTypedArrayEnum = 1;
1394pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8: JSTypedArrayEnum = 2;
1395pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT16: JSTypedArrayEnum = 3;
1396pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT16: JSTypedArrayEnum = 4;
1397pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT32: JSTypedArrayEnum = 5;
1398pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT32: JSTypedArrayEnum = 6;
1399pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_INT64: JSTypedArrayEnum = 7;
1400pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_UINT64: JSTypedArrayEnum = 8;
1401pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT16: JSTypedArrayEnum = 9;
1402pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT32: JSTypedArrayEnum = 10;
1403pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT64: JSTypedArrayEnum = 11;
1404pub type JSTypedArrayEnum = ::core::ffi::c_uint;
1405unsafe extern "C" {
1406 pub fn JS_NewTypedArray(
1407 ctx: *mut JSContext,
1408 argc: ::core::ffi::c_int,
1409 argv: *mut JSValue,
1410 array_type: JSTypedArrayEnum,
1411 ) -> JSValue;
1412}
1413unsafe extern "C" {
1414 pub fn JS_GetTypedArrayBuffer(
1415 ctx: *mut JSContext,
1416 obj: JSValue,
1417 pbyte_offset: *mut size_t,
1418 pbyte_length: *mut size_t,
1419 pbytes_per_element: *mut size_t,
1420 ) -> JSValue;
1421}
1422unsafe extern "C" {
1423 pub fn JS_NewUint8Array(
1424 ctx: *mut JSContext,
1425 buf: *mut u8,
1426 len: size_t,
1427 free_func: JSFreeArrayBufferDataFunc,
1428 opaque: *mut ::core::ffi::c_void,
1429 is_shared: bool,
1430 ) -> JSValue;
1431}
1432unsafe extern "C" {
1433 pub fn JS_GetTypedArrayType(obj: JSValue) -> ::core::ffi::c_int;
1434}
1435unsafe extern "C" {
1436 pub fn JS_NewUint8ArrayCopy(ctx: *mut JSContext, buf: *const u8, len: size_t) -> JSValue;
1437}
1438#[repr(C)]
1439#[derive(Debug, Copy, Clone)]
1440pub struct JSSharedArrayBufferFunctions {
1441 pub sab_alloc: ::core::option::Option<
1442 unsafe extern "C" fn(
1443 opaque: *mut ::core::ffi::c_void,
1444 size: size_t,
1445 ) -> *mut ::core::ffi::c_void,
1446 >,
1447 pub sab_free: ::core::option::Option<
1448 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
1449 >,
1450 pub sab_dup: ::core::option::Option<
1451 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
1452 >,
1453 pub sab_opaque: *mut ::core::ffi::c_void,
1454}
1455#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1456const _: () = {
1457 ["Size of JSSharedArrayBufferFunctions"]
1458 [::core::mem::size_of::<JSSharedArrayBufferFunctions>() - 32usize];
1459 ["Alignment of JSSharedArrayBufferFunctions"]
1460 [::core::mem::align_of::<JSSharedArrayBufferFunctions>() - 8usize];
1461 ["Offset of field: JSSharedArrayBufferFunctions::sab_alloc"]
1462 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_alloc) - 0usize];
1463 ["Offset of field: JSSharedArrayBufferFunctions::sab_free"]
1464 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_free) - 8usize];
1465 ["Offset of field: JSSharedArrayBufferFunctions::sab_dup"]
1466 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_dup) - 16usize];
1467 ["Offset of field: JSSharedArrayBufferFunctions::sab_opaque"]
1468 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_opaque) - 24usize];
1469};
1470unsafe extern "C" {
1471 pub fn JS_SetSharedArrayBufferFunctions(
1472 rt: *mut JSRuntime,
1473 sf: *const JSSharedArrayBufferFunctions,
1474 );
1475}
1476pub const JSPromiseStateEnum_JS_PROMISE_NOT_A_PROMISE: JSPromiseStateEnum = -1;
1477pub const JSPromiseStateEnum_JS_PROMISE_PENDING: JSPromiseStateEnum = 0;
1478pub const JSPromiseStateEnum_JS_PROMISE_FULFILLED: JSPromiseStateEnum = 1;
1479pub const JSPromiseStateEnum_JS_PROMISE_REJECTED: JSPromiseStateEnum = 2;
1480pub type JSPromiseStateEnum = ::core::ffi::c_int;
1481unsafe extern "C" {
1482 pub fn JS_NewPromiseCapability(ctx: *mut JSContext, resolving_funcs: *mut JSValue) -> JSValue;
1483}
1484unsafe extern "C" {
1485 pub fn JS_PromiseState(ctx: *mut JSContext, promise: JSValue) -> JSPromiseStateEnum;
1486}
1487unsafe extern "C" {
1488 pub fn JS_PromiseResult(ctx: *mut JSContext, promise: JSValue) -> JSValue;
1489}
1490unsafe extern "C" {
1491 pub fn JS_IsPromise(val: JSValue) -> bool;
1492}
1493unsafe extern "C" {
1494 pub fn JS_NewSettledPromise(ctx: *mut JSContext, is_reject: bool, value: JSValue) -> JSValue;
1495}
1496unsafe extern "C" {
1497 pub fn JS_NewSymbol(
1498 ctx: *mut JSContext,
1499 description: *const ::core::ffi::c_char,
1500 is_global: bool,
1501 ) -> JSValue;
1502}
1503pub const JSPromiseHookType_JS_PROMISE_HOOK_INIT: JSPromiseHookType = 0;
1504pub const JSPromiseHookType_JS_PROMISE_HOOK_BEFORE: JSPromiseHookType = 1;
1505pub const JSPromiseHookType_JS_PROMISE_HOOK_AFTER: JSPromiseHookType = 2;
1506pub const JSPromiseHookType_JS_PROMISE_HOOK_RESOLVE: JSPromiseHookType = 3;
1507pub type JSPromiseHookType = ::core::ffi::c_uint;
1508pub type JSPromiseHook = ::core::option::Option<
1509 unsafe extern "C" fn(
1510 ctx: *mut JSContext,
1511 type_: JSPromiseHookType,
1512 promise: JSValue,
1513 parent_promise: JSValue,
1514 opaque: *mut ::core::ffi::c_void,
1515 ),
1516>;
1517unsafe extern "C" {
1518 pub fn JS_SetPromiseHook(
1519 rt: *mut JSRuntime,
1520 promise_hook: JSPromiseHook,
1521 opaque: *mut ::core::ffi::c_void,
1522 );
1523}
1524pub type JSHostPromiseRejectionTracker = ::core::option::Option<
1525 unsafe extern "C" fn(
1526 ctx: *mut JSContext,
1527 promise: JSValue,
1528 reason: JSValue,
1529 is_handled: bool,
1530 opaque: *mut ::core::ffi::c_void,
1531 ),
1532>;
1533unsafe extern "C" {
1534 pub fn JS_SetHostPromiseRejectionTracker(
1535 rt: *mut JSRuntime,
1536 cb: JSHostPromiseRejectionTracker,
1537 opaque: *mut ::core::ffi::c_void,
1538 );
1539}
1540pub type JSInterruptHandler = ::core::option::Option<
1541 unsafe extern "C" fn(
1542 rt: *mut JSRuntime,
1543 opaque: *mut ::core::ffi::c_void,
1544 ) -> ::core::ffi::c_int,
1545>;
1546unsafe extern "C" {
1547 pub fn JS_SetInterruptHandler(
1548 rt: *mut JSRuntime,
1549 cb: JSInterruptHandler,
1550 opaque: *mut ::core::ffi::c_void,
1551 );
1552}
1553unsafe extern "C" {
1554 pub fn JS_SetCanBlock(rt: *mut JSRuntime, can_block: bool);
1555}
1556unsafe extern "C" {
1557 pub fn JS_SetIsHTMLDDA(ctx: *mut JSContext, obj: JSValue);
1558}
1559#[repr(C)]
1560#[derive(Debug, Copy, Clone)]
1561pub struct JSModuleDef {
1562 _unused: [u8; 0],
1563}
1564pub type JSModuleNormalizeFunc = ::core::option::Option<
1565 unsafe extern "C" fn(
1566 ctx: *mut JSContext,
1567 module_base_name: *const ::core::ffi::c_char,
1568 module_name: *const ::core::ffi::c_char,
1569 opaque: *mut ::core::ffi::c_void,
1570 ) -> *mut ::core::ffi::c_char,
1571>;
1572pub type JSModuleNormalizeFunc2 = ::core::option::Option<
1573 unsafe extern "C" fn(
1574 ctx: *mut JSContext,
1575 module_base_name: *const ::core::ffi::c_char,
1576 module_name: *const ::core::ffi::c_char,
1577 attributes: JSValue,
1578 opaque: *mut ::core::ffi::c_void,
1579 ) -> *mut ::core::ffi::c_char,
1580>;
1581pub type JSModuleLoaderFunc = ::core::option::Option<
1582 unsafe extern "C" fn(
1583 ctx: *mut JSContext,
1584 module_name: *const ::core::ffi::c_char,
1585 opaque: *mut ::core::ffi::c_void,
1586 ) -> *mut JSModuleDef,
1587>;
1588pub type JSModuleLoaderFunc2 = ::core::option::Option<
1589 unsafe extern "C" fn(
1590 ctx: *mut JSContext,
1591 module_name: *const ::core::ffi::c_char,
1592 opaque: *mut ::core::ffi::c_void,
1593 attributes: JSValue,
1594 ) -> *mut JSModuleDef,
1595>;
1596pub type JSModuleCheckSupportedImportAttributes = ::core::option::Option<
1597 unsafe extern "C" fn(
1598 ctx: *mut JSContext,
1599 opaque: *mut ::core::ffi::c_void,
1600 attributes: JSValue,
1601 ) -> ::core::ffi::c_int,
1602>;
1603unsafe extern "C" {
1604 pub fn JS_SetModuleLoaderFunc(
1605 rt: *mut JSRuntime,
1606 module_normalize: JSModuleNormalizeFunc,
1607 module_loader: JSModuleLoaderFunc,
1608 opaque: *mut ::core::ffi::c_void,
1609 );
1610}
1611unsafe extern "C" {
1612 pub fn JS_SetModuleLoaderFunc2(
1613 rt: *mut JSRuntime,
1614 module_normalize: JSModuleNormalizeFunc,
1615 module_loader: JSModuleLoaderFunc2,
1616 module_check_attrs: JSModuleCheckSupportedImportAttributes,
1617 opaque: *mut ::core::ffi::c_void,
1618 );
1619}
1620unsafe extern "C" {
1621 pub fn JS_SetModuleNormalizeFunc2(rt: *mut JSRuntime, module_normalize: JSModuleNormalizeFunc2);
1622}
1623unsafe extern "C" {
1624 pub fn JS_GetImportMeta(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
1625}
1626unsafe extern "C" {
1627 pub fn JS_GetModuleName(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSAtom;
1628}
1629unsafe extern "C" {
1630 pub fn JS_GetModuleNamespace(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
1631}
1632unsafe extern "C" {
1633 pub fn JS_SetModulePrivateValue(
1634 ctx: *mut JSContext,
1635 m: *mut JSModuleDef,
1636 val: JSValue,
1637 ) -> ::core::ffi::c_int;
1638}
1639unsafe extern "C" {
1640 pub fn JS_GetModulePrivateValue(ctx: *mut JSContext, m: *mut JSModuleDef) -> JSValue;
1641}
1642pub type JSJobFunc = ::core::option::Option<
1643 unsafe extern "C" fn(
1644 ctx: *mut JSContext,
1645 argc: ::core::ffi::c_int,
1646 argv: *mut JSValue,
1647 ) -> JSValue,
1648>;
1649unsafe extern "C" {
1650 pub fn JS_EnqueueJob(
1651 ctx: *mut JSContext,
1652 job_func: JSJobFunc,
1653 argc: ::core::ffi::c_int,
1654 argv: *mut JSValue,
1655 ) -> ::core::ffi::c_int;
1656}
1657unsafe extern "C" {
1658 pub fn JS_IsJobPending(rt: *mut JSRuntime) -> bool;
1659}
1660unsafe extern "C" {
1661 pub fn JS_GetPendingJobContext(rt: *mut JSRuntime) -> *mut JSContext;
1662}
1663unsafe extern "C" {
1664 pub fn JS_ExecutePendingJob(
1665 rt: *mut JSRuntime,
1666 pctx: *mut *mut JSContext,
1667 ) -> ::core::ffi::c_int;
1668}
1669#[repr(C)]
1670#[derive(Debug, Copy, Clone)]
1671pub struct JSSABTab {
1672 pub tab: *mut *mut u8,
1673 pub len: size_t,
1674}
1675#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1676const _: () = {
1677 ["Size of JSSABTab"][::core::mem::size_of::<JSSABTab>() - 16usize];
1678 ["Alignment of JSSABTab"][::core::mem::align_of::<JSSABTab>() - 8usize];
1679 ["Offset of field: JSSABTab::tab"][::core::mem::offset_of!(JSSABTab, tab) - 0usize];
1680 ["Offset of field: JSSABTab::len"][::core::mem::offset_of!(JSSABTab, len) - 8usize];
1681};
1682unsafe extern "C" {
1683 pub fn JS_WriteObject(
1684 ctx: *mut JSContext,
1685 psize: *mut size_t,
1686 obj: JSValue,
1687 flags: ::core::ffi::c_int,
1688 ) -> *mut u8;
1689}
1690unsafe extern "C" {
1691 pub fn JS_WriteObject2(
1692 ctx: *mut JSContext,
1693 psize: *mut size_t,
1694 obj: JSValue,
1695 flags: ::core::ffi::c_int,
1696 psab_tab: *mut JSSABTab,
1697 ) -> *mut u8;
1698}
1699unsafe extern "C" {
1700 pub fn JS_ReadObject(
1701 ctx: *mut JSContext,
1702 buf: *const u8,
1703 buf_len: size_t,
1704 flags: ::core::ffi::c_int,
1705 ) -> JSValue;
1706}
1707unsafe extern "C" {
1708 pub fn JS_ReadObject2(
1709 ctx: *mut JSContext,
1710 buf: *const u8,
1711 buf_len: size_t,
1712 flags: ::core::ffi::c_int,
1713 psab_tab: *mut JSSABTab,
1714 ) -> JSValue;
1715}
1716unsafe extern "C" {
1717 pub fn JS_EvalFunction(ctx: *mut JSContext, fun_obj: JSValue) -> JSValue;
1718}
1719unsafe extern "C" {
1720 pub fn JS_ResolveModule(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1721}
1722unsafe extern "C" {
1723 pub fn JS_GetScriptOrModuleName(
1724 ctx: *mut JSContext,
1725 n_stack_levels: ::core::ffi::c_int,
1726 ) -> JSAtom;
1727}
1728unsafe extern "C" {
1729 pub fn JS_LoadModule(
1730 ctx: *mut JSContext,
1731 basename: *const ::core::ffi::c_char,
1732 filename: *const ::core::ffi::c_char,
1733 ) -> JSValue;
1734}
1735pub const JSCFunctionEnum_JS_CFUNC_generic: JSCFunctionEnum = 0;
1736pub const JSCFunctionEnum_JS_CFUNC_generic_magic: JSCFunctionEnum = 1;
1737pub const JSCFunctionEnum_JS_CFUNC_constructor: JSCFunctionEnum = 2;
1738pub const JSCFunctionEnum_JS_CFUNC_constructor_magic: JSCFunctionEnum = 3;
1739pub const JSCFunctionEnum_JS_CFUNC_constructor_or_func: JSCFunctionEnum = 4;
1740pub const JSCFunctionEnum_JS_CFUNC_constructor_or_func_magic: JSCFunctionEnum = 5;
1741pub const JSCFunctionEnum_JS_CFUNC_f_f: JSCFunctionEnum = 6;
1742pub const JSCFunctionEnum_JS_CFUNC_f_f_f: JSCFunctionEnum = 7;
1743pub const JSCFunctionEnum_JS_CFUNC_getter: JSCFunctionEnum = 8;
1744pub const JSCFunctionEnum_JS_CFUNC_setter: JSCFunctionEnum = 9;
1745pub const JSCFunctionEnum_JS_CFUNC_getter_magic: JSCFunctionEnum = 10;
1746pub const JSCFunctionEnum_JS_CFUNC_setter_magic: JSCFunctionEnum = 11;
1747pub const JSCFunctionEnum_JS_CFUNC_iterator_next: JSCFunctionEnum = 12;
1748pub type JSCFunctionEnum = ::core::ffi::c_uint;
1749#[repr(C)]
1750#[derive(Copy, Clone)]
1751pub union JSCFunctionType {
1752 pub generic: JSCFunction,
1753 pub generic_magic: ::core::option::Option<
1754 unsafe extern "C" fn(
1755 ctx: *mut JSContext,
1756 this_val: JSValue,
1757 argc: ::core::ffi::c_int,
1758 argv: *mut JSValue,
1759 magic: ::core::ffi::c_int,
1760 ) -> JSValue,
1761 >,
1762 pub constructor: JSCFunction,
1763 pub constructor_magic: ::core::option::Option<
1764 unsafe extern "C" fn(
1765 ctx: *mut JSContext,
1766 new_target: JSValue,
1767 argc: ::core::ffi::c_int,
1768 argv: *mut JSValue,
1769 magic: ::core::ffi::c_int,
1770 ) -> JSValue,
1771 >,
1772 pub constructor_or_func: JSCFunction,
1773 pub f_f: ::core::option::Option<unsafe extern "C" fn(arg1: f64) -> f64>,
1774 pub f_f_f: ::core::option::Option<unsafe extern "C" fn(arg1: f64, arg2: f64) -> f64>,
1775 pub getter: ::core::option::Option<
1776 unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue) -> JSValue,
1777 >,
1778 pub setter: ::core::option::Option<
1779 unsafe extern "C" fn(ctx: *mut JSContext, this_val: JSValue, val: JSValue) -> JSValue,
1780 >,
1781 pub getter_magic: ::core::option::Option<
1782 unsafe extern "C" fn(
1783 ctx: *mut JSContext,
1784 this_val: JSValue,
1785 magic: ::core::ffi::c_int,
1786 ) -> JSValue,
1787 >,
1788 pub setter_magic: ::core::option::Option<
1789 unsafe extern "C" fn(
1790 ctx: *mut JSContext,
1791 this_val: JSValue,
1792 val: JSValue,
1793 magic: ::core::ffi::c_int,
1794 ) -> JSValue,
1795 >,
1796 pub iterator_next: ::core::option::Option<
1797 unsafe extern "C" fn(
1798 ctx: *mut JSContext,
1799 this_val: JSValue,
1800 argc: ::core::ffi::c_int,
1801 argv: *mut JSValue,
1802 pdone: *mut ::core::ffi::c_int,
1803 magic: ::core::ffi::c_int,
1804 ) -> JSValue,
1805 >,
1806}
1807#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1808const _: () = {
1809 ["Size of JSCFunctionType"][::core::mem::size_of::<JSCFunctionType>() - 8usize];
1810 ["Alignment of JSCFunctionType"][::core::mem::align_of::<JSCFunctionType>() - 8usize];
1811 ["Offset of field: JSCFunctionType::generic"]
1812 [::core::mem::offset_of!(JSCFunctionType, generic) - 0usize];
1813 ["Offset of field: JSCFunctionType::generic_magic"]
1814 [::core::mem::offset_of!(JSCFunctionType, generic_magic) - 0usize];
1815 ["Offset of field: JSCFunctionType::constructor"]
1816 [::core::mem::offset_of!(JSCFunctionType, constructor) - 0usize];
1817 ["Offset of field: JSCFunctionType::constructor_magic"]
1818 [::core::mem::offset_of!(JSCFunctionType, constructor_magic) - 0usize];
1819 ["Offset of field: JSCFunctionType::constructor_or_func"]
1820 [::core::mem::offset_of!(JSCFunctionType, constructor_or_func) - 0usize];
1821 ["Offset of field: JSCFunctionType::f_f"]
1822 [::core::mem::offset_of!(JSCFunctionType, f_f) - 0usize];
1823 ["Offset of field: JSCFunctionType::f_f_f"]
1824 [::core::mem::offset_of!(JSCFunctionType, f_f_f) - 0usize];
1825 ["Offset of field: JSCFunctionType::getter"]
1826 [::core::mem::offset_of!(JSCFunctionType, getter) - 0usize];
1827 ["Offset of field: JSCFunctionType::setter"]
1828 [::core::mem::offset_of!(JSCFunctionType, setter) - 0usize];
1829 ["Offset of field: JSCFunctionType::getter_magic"]
1830 [::core::mem::offset_of!(JSCFunctionType, getter_magic) - 0usize];
1831 ["Offset of field: JSCFunctionType::setter_magic"]
1832 [::core::mem::offset_of!(JSCFunctionType, setter_magic) - 0usize];
1833 ["Offset of field: JSCFunctionType::iterator_next"]
1834 [::core::mem::offset_of!(JSCFunctionType, iterator_next) - 0usize];
1835};
1836unsafe extern "C" {
1837 pub fn JS_NewCFunction2(
1838 ctx: *mut JSContext,
1839 func: JSCFunction,
1840 name: *const ::core::ffi::c_char,
1841 length: ::core::ffi::c_int,
1842 cproto: JSCFunctionEnum,
1843 magic: ::core::ffi::c_int,
1844 ) -> JSValue;
1845}
1846unsafe extern "C" {
1847 pub fn JS_NewCFunction3(
1848 ctx: *mut JSContext,
1849 func: JSCFunction,
1850 name: *const ::core::ffi::c_char,
1851 length: ::core::ffi::c_int,
1852 cproto: JSCFunctionEnum,
1853 magic: ::core::ffi::c_int,
1854 proto_val: JSValue,
1855 n_fields: ::core::ffi::c_int,
1856 ) -> JSValue;
1857}
1858unsafe extern "C" {
1859 pub fn JS_NewCFunctionData(
1860 ctx: *mut JSContext,
1861 func: JSCFunctionData,
1862 length: ::core::ffi::c_int,
1863 magic: ::core::ffi::c_int,
1864 data_len: ::core::ffi::c_int,
1865 data: *mut JSValue,
1866 ) -> JSValue;
1867}
1868unsafe extern "C" {
1869 pub fn JS_NewCFunctionData2(
1870 ctx: *mut JSContext,
1871 func: JSCFunctionData,
1872 name: *const ::core::ffi::c_char,
1873 length: ::core::ffi::c_int,
1874 magic: ::core::ffi::c_int,
1875 data_len: ::core::ffi::c_int,
1876 data: *mut JSValue,
1877 ) -> JSValue;
1878}
1879pub type JSCClosureFinalizerFunc =
1880 ::core::option::Option<unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void)>;
1881unsafe extern "C" {
1882 pub fn JS_NewCClosure(
1883 ctx: *mut JSContext,
1884 func: JSCClosure,
1885 name: *const ::core::ffi::c_char,
1886 opaque_finalize: JSCClosureFinalizerFunc,
1887 length: ::core::ffi::c_int,
1888 magic: ::core::ffi::c_int,
1889 opaque: *mut ::core::ffi::c_void,
1890 ) -> JSValue;
1891}
1892unsafe extern "C" {
1893 pub fn JS_SetConstructor(
1894 ctx: *mut JSContext,
1895 func_obj: JSValue,
1896 proto: JSValue,
1897 ) -> ::core::ffi::c_int;
1898}
1899#[repr(C)]
1900#[derive(Copy, Clone)]
1901pub struct JSCFunctionListEntry {
1902 pub name: *const ::core::ffi::c_char,
1903 pub prop_flags: u8,
1904 pub def_type: u8,
1905 pub magic: i16,
1906 pub u: JSCFunctionListEntry__bindgen_ty_1,
1907}
1908#[repr(C)]
1909#[derive(Copy, Clone)]
1910pub union JSCFunctionListEntry__bindgen_ty_1 {
1911 pub func: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1,
1912 pub getset: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2,
1913 pub alias: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3,
1914 pub prop_list: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4,
1915 pub str_: *const ::core::ffi::c_char,
1916 pub i32_: i32,
1917 pub i64_: i64,
1918 pub u64_: u64,
1919 pub f64_: f64,
1920}
1921#[repr(C)]
1922#[derive(Copy, Clone)]
1923pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1 {
1924 pub length: u8,
1925 pub cproto: u8,
1926 pub cfunc: JSCFunctionType,
1927}
1928#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1929const _: () = {
1930 ["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1"]
1931 [::core::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>() - 16usize];
1932 ["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1"]
1933 [::core::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1>() - 8usize];
1934 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::length"][::core::mem::offset_of!(
1935 JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1,
1936 length
1937 ) - 0usize];
1938 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::cproto"][::core::mem::offset_of!(
1939 JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1,
1940 cproto
1941 ) - 1usize];
1942 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1::cfunc"]
1943 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_1, cfunc) - 8usize];
1944};
1945#[repr(C)]
1946#[derive(Copy, Clone)]
1947pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2 {
1948 pub get: JSCFunctionType,
1949 pub set: JSCFunctionType,
1950}
1951#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1952const _: () = {
1953 ["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2"]
1954 [::core::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>() - 16usize];
1955 ["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2"]
1956 [::core::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2>() - 8usize];
1957 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2::get"]
1958 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2, get) - 0usize];
1959 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2::set"]
1960 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_2, set) - 8usize];
1961};
1962#[repr(C)]
1963#[derive(Debug, Copy, Clone)]
1964pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3 {
1965 pub name: *const ::core::ffi::c_char,
1966 pub base: ::core::ffi::c_int,
1967}
1968#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1969const _: () = {
1970 ["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3"]
1971 [::core::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>() - 16usize];
1972 ["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3"]
1973 [::core::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3>() - 8usize];
1974 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3::name"]
1975 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3, name) - 0usize];
1976 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3::base"]
1977 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_3, base) - 8usize];
1978};
1979#[repr(C)]
1980#[derive(Debug, Copy, Clone)]
1981pub struct JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4 {
1982 pub tab: *const JSCFunctionListEntry,
1983 pub len: ::core::ffi::c_int,
1984}
1985#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1986const _: () = {
1987 ["Size of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4"]
1988 [::core::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>() - 16usize];
1989 ["Alignment of JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4"]
1990 [::core::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4>() - 8usize];
1991 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4::tab"]
1992 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4, tab) - 0usize];
1993 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4::len"]
1994 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1__bindgen_ty_4, len) - 8usize];
1995};
1996#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1997const _: () = {
1998 ["Size of JSCFunctionListEntry__bindgen_ty_1"]
1999 [::core::mem::size_of::<JSCFunctionListEntry__bindgen_ty_1>() - 16usize];
2000 ["Alignment of JSCFunctionListEntry__bindgen_ty_1"]
2001 [::core::mem::align_of::<JSCFunctionListEntry__bindgen_ty_1>() - 8usize];
2002 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::func"]
2003 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, func) - 0usize];
2004 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::getset"]
2005 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, getset) - 0usize];
2006 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::alias"]
2007 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, alias) - 0usize];
2008 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::prop_list"]
2009 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, prop_list) - 0usize];
2010 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::str_"]
2011 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, str_) - 0usize];
2012 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::i32_"]
2013 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, i32_) - 0usize];
2014 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::i64_"]
2015 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, i64_) - 0usize];
2016 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::u64_"]
2017 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, u64_) - 0usize];
2018 ["Offset of field: JSCFunctionListEntry__bindgen_ty_1::f64_"]
2019 [::core::mem::offset_of!(JSCFunctionListEntry__bindgen_ty_1, f64_) - 0usize];
2020};
2021#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2022const _: () = {
2023 ["Size of JSCFunctionListEntry"][::core::mem::size_of::<JSCFunctionListEntry>() - 32usize];
2024 ["Alignment of JSCFunctionListEntry"][::core::mem::align_of::<JSCFunctionListEntry>() - 8usize];
2025 ["Offset of field: JSCFunctionListEntry::name"]
2026 [::core::mem::offset_of!(JSCFunctionListEntry, name) - 0usize];
2027 ["Offset of field: JSCFunctionListEntry::prop_flags"]
2028 [::core::mem::offset_of!(JSCFunctionListEntry, prop_flags) - 8usize];
2029 ["Offset of field: JSCFunctionListEntry::def_type"]
2030 [::core::mem::offset_of!(JSCFunctionListEntry, def_type) - 9usize];
2031 ["Offset of field: JSCFunctionListEntry::magic"]
2032 [::core::mem::offset_of!(JSCFunctionListEntry, magic) - 10usize];
2033 ["Offset of field: JSCFunctionListEntry::u"]
2034 [::core::mem::offset_of!(JSCFunctionListEntry, u) - 16usize];
2035};
2036unsafe extern "C" {
2037 pub fn JS_SetPropertyFunctionList(
2038 ctx: *mut JSContext,
2039 obj: JSValue,
2040 tab: *const JSCFunctionListEntry,
2041 len: ::core::ffi::c_int,
2042 ) -> ::core::ffi::c_int;
2043}
2044pub type JSModuleInitFunc = ::core::option::Option<
2045 unsafe extern "C" fn(ctx: *mut JSContext, m: *mut JSModuleDef) -> ::core::ffi::c_int,
2046>;
2047unsafe extern "C" {
2048 pub fn JS_NewCModule(
2049 ctx: *mut JSContext,
2050 name_str: *const ::core::ffi::c_char,
2051 func: JSModuleInitFunc,
2052 ) -> *mut JSModuleDef;
2053}
2054unsafe extern "C" {
2055 pub fn JS_AddModuleExport(
2056 ctx: *mut JSContext,
2057 m: *mut JSModuleDef,
2058 name_str: *const ::core::ffi::c_char,
2059 ) -> ::core::ffi::c_int;
2060}
2061unsafe extern "C" {
2062 pub fn JS_AddModuleExportList(
2063 ctx: *mut JSContext,
2064 m: *mut JSModuleDef,
2065 tab: *const JSCFunctionListEntry,
2066 len: ::core::ffi::c_int,
2067 ) -> ::core::ffi::c_int;
2068}
2069unsafe extern "C" {
2070 pub fn JS_SetModuleExport(
2071 ctx: *mut JSContext,
2072 m: *mut JSModuleDef,
2073 export_name: *const ::core::ffi::c_char,
2074 val: JSValue,
2075 ) -> ::core::ffi::c_int;
2076}
2077unsafe extern "C" {
2078 pub fn JS_SetModuleExportList(
2079 ctx: *mut JSContext,
2080 m: *mut JSModuleDef,
2081 tab: *const JSCFunctionListEntry,
2082 len: ::core::ffi::c_int,
2083 ) -> ::core::ffi::c_int;
2084}
2085unsafe extern "C" {
2086 pub fn JS_GetVersion() -> *const ::core::ffi::c_char;
2087}
2088unsafe extern "C" {
2089 pub fn js_std_cmd(cmd: ::core::ffi::c_int, ...) -> usize;
2090}
2091pub const __JS_ATOM_NULL: _bindgen_ty_4 = 0;
2092pub const JS_ATOM_null: _bindgen_ty_4 = 1;
2093pub const JS_ATOM_false: _bindgen_ty_4 = 2;
2094pub const JS_ATOM_true: _bindgen_ty_4 = 3;
2095pub const JS_ATOM_if: _bindgen_ty_4 = 4;
2096pub const JS_ATOM_else: _bindgen_ty_4 = 5;
2097pub const JS_ATOM_return: _bindgen_ty_4 = 6;
2098pub const JS_ATOM_var: _bindgen_ty_4 = 7;
2099pub const JS_ATOM_this: _bindgen_ty_4 = 8;
2100pub const JS_ATOM_delete: _bindgen_ty_4 = 9;
2101pub const JS_ATOM_void: _bindgen_ty_4 = 10;
2102pub const JS_ATOM_typeof: _bindgen_ty_4 = 11;
2103pub const JS_ATOM_new: _bindgen_ty_4 = 12;
2104pub const JS_ATOM_in: _bindgen_ty_4 = 13;
2105pub const JS_ATOM_instanceof: _bindgen_ty_4 = 14;
2106pub const JS_ATOM_do: _bindgen_ty_4 = 15;
2107pub const JS_ATOM_while: _bindgen_ty_4 = 16;
2108pub const JS_ATOM_for: _bindgen_ty_4 = 17;
2109pub const JS_ATOM_break: _bindgen_ty_4 = 18;
2110pub const JS_ATOM_continue: _bindgen_ty_4 = 19;
2111pub const JS_ATOM_switch: _bindgen_ty_4 = 20;
2112pub const JS_ATOM_case: _bindgen_ty_4 = 21;
2113pub const JS_ATOM_default: _bindgen_ty_4 = 22;
2114pub const JS_ATOM_throw: _bindgen_ty_4 = 23;
2115pub const JS_ATOM_try: _bindgen_ty_4 = 24;
2116pub const JS_ATOM_catch: _bindgen_ty_4 = 25;
2117pub const JS_ATOM_finally: _bindgen_ty_4 = 26;
2118pub const JS_ATOM_function: _bindgen_ty_4 = 27;
2119pub const JS_ATOM_debugger: _bindgen_ty_4 = 28;
2120pub const JS_ATOM_with: _bindgen_ty_4 = 29;
2121pub const JS_ATOM_class: _bindgen_ty_4 = 30;
2122pub const JS_ATOM_const: _bindgen_ty_4 = 31;
2123pub const JS_ATOM_enum: _bindgen_ty_4 = 32;
2124pub const JS_ATOM_export: _bindgen_ty_4 = 33;
2125pub const JS_ATOM_extends: _bindgen_ty_4 = 34;
2126pub const JS_ATOM_import: _bindgen_ty_4 = 35;
2127pub const JS_ATOM_super: _bindgen_ty_4 = 36;
2128pub const JS_ATOM_using: _bindgen_ty_4 = 37;
2129pub const JS_ATOM_implements: _bindgen_ty_4 = 38;
2130pub const JS_ATOM_interface: _bindgen_ty_4 = 39;
2131pub const JS_ATOM_let: _bindgen_ty_4 = 40;
2132pub const JS_ATOM_package: _bindgen_ty_4 = 41;
2133pub const JS_ATOM_private: _bindgen_ty_4 = 42;
2134pub const JS_ATOM_protected: _bindgen_ty_4 = 43;
2135pub const JS_ATOM_public: _bindgen_ty_4 = 44;
2136pub const JS_ATOM_static: _bindgen_ty_4 = 45;
2137pub const JS_ATOM_yield: _bindgen_ty_4 = 46;
2138pub const JS_ATOM_await: _bindgen_ty_4 = 47;
2139pub const JS_ATOM_empty_string: _bindgen_ty_4 = 48;
2140pub const JS_ATOM_keys: _bindgen_ty_4 = 49;
2141pub const JS_ATOM_size: _bindgen_ty_4 = 50;
2142pub const JS_ATOM_length: _bindgen_ty_4 = 51;
2143pub const JS_ATOM_message: _bindgen_ty_4 = 52;
2144pub const JS_ATOM_cause: _bindgen_ty_4 = 53;
2145pub const JS_ATOM_errors: _bindgen_ty_4 = 54;
2146pub const JS_ATOM_error: _bindgen_ty_4 = 55;
2147pub const JS_ATOM_suppressed: _bindgen_ty_4 = 56;
2148pub const JS_ATOM_stack: _bindgen_ty_4 = 57;
2149pub const JS_ATOM_name: _bindgen_ty_4 = 58;
2150pub const JS_ATOM_toString: _bindgen_ty_4 = 59;
2151pub const JS_ATOM_toLocaleString: _bindgen_ty_4 = 60;
2152pub const JS_ATOM_valueOf: _bindgen_ty_4 = 61;
2153pub const JS_ATOM_eval: _bindgen_ty_4 = 62;
2154pub const JS_ATOM_prototype: _bindgen_ty_4 = 63;
2155pub const JS_ATOM_constructor: _bindgen_ty_4 = 64;
2156pub const JS_ATOM_configurable: _bindgen_ty_4 = 65;
2157pub const JS_ATOM_writable: _bindgen_ty_4 = 66;
2158pub const JS_ATOM_enumerable: _bindgen_ty_4 = 67;
2159pub const JS_ATOM_value: _bindgen_ty_4 = 68;
2160pub const JS_ATOM_get: _bindgen_ty_4 = 69;
2161pub const JS_ATOM_set: _bindgen_ty_4 = 70;
2162pub const JS_ATOM_of: _bindgen_ty_4 = 71;
2163pub const JS_ATOM___proto__: _bindgen_ty_4 = 72;
2164pub const JS_ATOM_undefined: _bindgen_ty_4 = 73;
2165pub const JS_ATOM_number: _bindgen_ty_4 = 74;
2166pub const JS_ATOM_boolean: _bindgen_ty_4 = 75;
2167pub const JS_ATOM_string: _bindgen_ty_4 = 76;
2168pub const JS_ATOM_object: _bindgen_ty_4 = 77;
2169pub const JS_ATOM_symbol: _bindgen_ty_4 = 78;
2170pub const JS_ATOM_integer: _bindgen_ty_4 = 79;
2171pub const JS_ATOM_unknown: _bindgen_ty_4 = 80;
2172pub const JS_ATOM_arguments: _bindgen_ty_4 = 81;
2173pub const JS_ATOM_callee: _bindgen_ty_4 = 82;
2174pub const JS_ATOM_caller: _bindgen_ty_4 = 83;
2175pub const JS_ATOM__eval_: _bindgen_ty_4 = 84;
2176pub const JS_ATOM__ret_: _bindgen_ty_4 = 85;
2177pub const JS_ATOM__var_: _bindgen_ty_4 = 86;
2178pub const JS_ATOM__arg_var_: _bindgen_ty_4 = 87;
2179pub const JS_ATOM__with_: _bindgen_ty_4 = 88;
2180pub const JS_ATOM__using_dispose_: _bindgen_ty_4 = 89;
2181pub const JS_ATOM_use: _bindgen_ty_4 = 90;
2182pub const JS_ATOM_dispose: _bindgen_ty_4 = 91;
2183pub const JS_ATOM_disposeAsync: _bindgen_ty_4 = 92;
2184pub const JS_ATOM_lastIndex: _bindgen_ty_4 = 93;
2185pub const JS_ATOM_target: _bindgen_ty_4 = 94;
2186pub const JS_ATOM_index: _bindgen_ty_4 = 95;
2187pub const JS_ATOM_input: _bindgen_ty_4 = 96;
2188pub const JS_ATOM_defineProperties: _bindgen_ty_4 = 97;
2189pub const JS_ATOM_apply: _bindgen_ty_4 = 98;
2190pub const JS_ATOM_join: _bindgen_ty_4 = 99;
2191pub const JS_ATOM_concat: _bindgen_ty_4 = 100;
2192pub const JS_ATOM_split: _bindgen_ty_4 = 101;
2193pub const JS_ATOM_construct: _bindgen_ty_4 = 102;
2194pub const JS_ATOM_getPrototypeOf: _bindgen_ty_4 = 103;
2195pub const JS_ATOM_setPrototypeOf: _bindgen_ty_4 = 104;
2196pub const JS_ATOM_isExtensible: _bindgen_ty_4 = 105;
2197pub const JS_ATOM_preventExtensions: _bindgen_ty_4 = 106;
2198pub const JS_ATOM_has: _bindgen_ty_4 = 107;
2199pub const JS_ATOM_deleteProperty: _bindgen_ty_4 = 108;
2200pub const JS_ATOM_defineProperty: _bindgen_ty_4 = 109;
2201pub const JS_ATOM_getOwnPropertyDescriptor: _bindgen_ty_4 = 110;
2202pub const JS_ATOM_ownKeys: _bindgen_ty_4 = 111;
2203pub const JS_ATOM_add: _bindgen_ty_4 = 112;
2204pub const JS_ATOM_done: _bindgen_ty_4 = 113;
2205pub const JS_ATOM_next: _bindgen_ty_4 = 114;
2206pub const JS_ATOM_values: _bindgen_ty_4 = 115;
2207pub const JS_ATOM_source: _bindgen_ty_4 = 116;
2208pub const JS_ATOM_flags: _bindgen_ty_4 = 117;
2209pub const JS_ATOM_global: _bindgen_ty_4 = 118;
2210pub const JS_ATOM_unicode: _bindgen_ty_4 = 119;
2211pub const JS_ATOM_raw: _bindgen_ty_4 = 120;
2212pub const JS_ATOM_rawJSON: _bindgen_ty_4 = 121;
2213pub const JS_ATOM_new_target: _bindgen_ty_4 = 122;
2214pub const JS_ATOM_this_active_func: _bindgen_ty_4 = 123;
2215pub const JS_ATOM_home_object: _bindgen_ty_4 = 124;
2216pub const JS_ATOM_computed_field: _bindgen_ty_4 = 125;
2217pub const JS_ATOM_static_computed_field: _bindgen_ty_4 = 126;
2218pub const JS_ATOM_class_fields_init: _bindgen_ty_4 = 127;
2219pub const JS_ATOM_brand: _bindgen_ty_4 = 128;
2220pub const JS_ATOM_hash_constructor: _bindgen_ty_4 = 129;
2221pub const JS_ATOM_as: _bindgen_ty_4 = 130;
2222pub const JS_ATOM_from: _bindgen_ty_4 = 131;
2223pub const JS_ATOM_fromAsync: _bindgen_ty_4 = 132;
2224pub const JS_ATOM_meta: _bindgen_ty_4 = 133;
2225pub const JS_ATOM__default_: _bindgen_ty_4 = 134;
2226pub const JS_ATOM__star_: _bindgen_ty_4 = 135;
2227pub const JS_ATOM_Module: _bindgen_ty_4 = 136;
2228pub const JS_ATOM_then: _bindgen_ty_4 = 137;
2229pub const JS_ATOM_resolve: _bindgen_ty_4 = 138;
2230pub const JS_ATOM_reject: _bindgen_ty_4 = 139;
2231pub const JS_ATOM_promise: _bindgen_ty_4 = 140;
2232pub const JS_ATOM_proxy: _bindgen_ty_4 = 141;
2233pub const JS_ATOM_revoke: _bindgen_ty_4 = 142;
2234pub const JS_ATOM_async: _bindgen_ty_4 = 143;
2235pub const JS_ATOM_exec: _bindgen_ty_4 = 144;
2236pub const JS_ATOM_groups: _bindgen_ty_4 = 145;
2237pub const JS_ATOM_indices: _bindgen_ty_4 = 146;
2238pub const JS_ATOM_status: _bindgen_ty_4 = 147;
2239pub const JS_ATOM_reason: _bindgen_ty_4 = 148;
2240pub const JS_ATOM_globalThis: _bindgen_ty_4 = 149;
2241pub const JS_ATOM_bigint: _bindgen_ty_4 = 150;
2242pub const JS_ATOM_not_equal: _bindgen_ty_4 = 151;
2243pub const JS_ATOM_timed_out: _bindgen_ty_4 = 152;
2244pub const JS_ATOM_ok: _bindgen_ty_4 = 153;
2245pub const JS_ATOM_toJSON: _bindgen_ty_4 = 154;
2246pub const JS_ATOM_maxByteLength: _bindgen_ty_4 = 155;
2247pub const JS_ATOM_zip: _bindgen_ty_4 = 156;
2248pub const JS_ATOM_zipKeyed: _bindgen_ty_4 = 157;
2249pub const JS_ATOM_Object: _bindgen_ty_4 = 158;
2250pub const JS_ATOM_Array: _bindgen_ty_4 = 159;
2251pub const JS_ATOM_Error: _bindgen_ty_4 = 160;
2252pub const JS_ATOM_Number: _bindgen_ty_4 = 161;
2253pub const JS_ATOM_String: _bindgen_ty_4 = 162;
2254pub const JS_ATOM_Boolean: _bindgen_ty_4 = 163;
2255pub const JS_ATOM_Symbol: _bindgen_ty_4 = 164;
2256pub const JS_ATOM_Arguments: _bindgen_ty_4 = 165;
2257pub const JS_ATOM_Math: _bindgen_ty_4 = 166;
2258pub const JS_ATOM_JSON: _bindgen_ty_4 = 167;
2259pub const JS_ATOM_Date: _bindgen_ty_4 = 168;
2260pub const JS_ATOM_Function: _bindgen_ty_4 = 169;
2261pub const JS_ATOM_GeneratorFunction: _bindgen_ty_4 = 170;
2262pub const JS_ATOM_ForInIterator: _bindgen_ty_4 = 171;
2263pub const JS_ATOM_RegExp: _bindgen_ty_4 = 172;
2264pub const JS_ATOM_ArrayBuffer: _bindgen_ty_4 = 173;
2265pub const JS_ATOM_SharedArrayBuffer: _bindgen_ty_4 = 174;
2266pub const JS_ATOM_Uint8ClampedArray: _bindgen_ty_4 = 175;
2267pub const JS_ATOM_Int8Array: _bindgen_ty_4 = 176;
2268pub const JS_ATOM_Uint8Array: _bindgen_ty_4 = 177;
2269pub const JS_ATOM_Int16Array: _bindgen_ty_4 = 178;
2270pub const JS_ATOM_Uint16Array: _bindgen_ty_4 = 179;
2271pub const JS_ATOM_Int32Array: _bindgen_ty_4 = 180;
2272pub const JS_ATOM_Uint32Array: _bindgen_ty_4 = 181;
2273pub const JS_ATOM_BigInt64Array: _bindgen_ty_4 = 182;
2274pub const JS_ATOM_BigUint64Array: _bindgen_ty_4 = 183;
2275pub const JS_ATOM_Float16Array: _bindgen_ty_4 = 184;
2276pub const JS_ATOM_Float32Array: _bindgen_ty_4 = 185;
2277pub const JS_ATOM_Float64Array: _bindgen_ty_4 = 186;
2278pub const JS_ATOM_DataView: _bindgen_ty_4 = 187;
2279pub const JS_ATOM_BigInt: _bindgen_ty_4 = 188;
2280pub const JS_ATOM_WeakRef: _bindgen_ty_4 = 189;
2281pub const JS_ATOM_FinalizationRegistry: _bindgen_ty_4 = 190;
2282pub const JS_ATOM_Map: _bindgen_ty_4 = 191;
2283pub const JS_ATOM_Set: _bindgen_ty_4 = 192;
2284pub const JS_ATOM_WeakMap: _bindgen_ty_4 = 193;
2285pub const JS_ATOM_WeakSet: _bindgen_ty_4 = 194;
2286pub const JS_ATOM_Iterator: _bindgen_ty_4 = 195;
2287pub const JS_ATOM_IteratorConcat: _bindgen_ty_4 = 196;
2288pub const JS_ATOM_IteratorHelper: _bindgen_ty_4 = 197;
2289pub const JS_ATOM_IteratorWrap: _bindgen_ty_4 = 198;
2290pub const JS_ATOM_Map_Iterator: _bindgen_ty_4 = 199;
2291pub const JS_ATOM_Set_Iterator: _bindgen_ty_4 = 200;
2292pub const JS_ATOM_Array_Iterator: _bindgen_ty_4 = 201;
2293pub const JS_ATOM_String_Iterator: _bindgen_ty_4 = 202;
2294pub const JS_ATOM_RegExp_String_Iterator: _bindgen_ty_4 = 203;
2295pub const JS_ATOM_Generator: _bindgen_ty_4 = 204;
2296pub const JS_ATOM_Proxy: _bindgen_ty_4 = 205;
2297pub const JS_ATOM_Promise: _bindgen_ty_4 = 206;
2298pub const JS_ATOM_PromiseResolveFunction: _bindgen_ty_4 = 207;
2299pub const JS_ATOM_PromiseRejectFunction: _bindgen_ty_4 = 208;
2300pub const JS_ATOM_AsyncFunction: _bindgen_ty_4 = 209;
2301pub const JS_ATOM_AsyncFunctionResolve: _bindgen_ty_4 = 210;
2302pub const JS_ATOM_AsyncFunctionReject: _bindgen_ty_4 = 211;
2303pub const JS_ATOM_AsyncGeneratorFunction: _bindgen_ty_4 = 212;
2304pub const JS_ATOM_AsyncGenerator: _bindgen_ty_4 = 213;
2305pub const JS_ATOM_EvalError: _bindgen_ty_4 = 214;
2306pub const JS_ATOM_RangeError: _bindgen_ty_4 = 215;
2307pub const JS_ATOM_ReferenceError: _bindgen_ty_4 = 216;
2308pub const JS_ATOM_SyntaxError: _bindgen_ty_4 = 217;
2309pub const JS_ATOM_TypeError: _bindgen_ty_4 = 218;
2310pub const JS_ATOM_URIError: _bindgen_ty_4 = 219;
2311pub const JS_ATOM_InternalError: _bindgen_ty_4 = 220;
2312pub const JS_ATOM_DOMException: _bindgen_ty_4 = 221;
2313pub const JS_ATOM_CallSite: _bindgen_ty_4 = 222;
2314pub const JS_ATOM_DisposableStack: _bindgen_ty_4 = 223;
2315pub const JS_ATOM_AsyncDisposableStack: _bindgen_ty_4 = 224;
2316pub const JS_ATOM_SuppressedError: _bindgen_ty_4 = 225;
2317pub const JS_ATOM_Private_brand: _bindgen_ty_4 = 226;
2318pub const JS_ATOM_Symbol_toPrimitive: _bindgen_ty_4 = 227;
2319pub const JS_ATOM_Symbol_iterator: _bindgen_ty_4 = 228;
2320pub const JS_ATOM_Symbol_match: _bindgen_ty_4 = 229;
2321pub const JS_ATOM_Symbol_matchAll: _bindgen_ty_4 = 230;
2322pub const JS_ATOM_Symbol_replace: _bindgen_ty_4 = 231;
2323pub const JS_ATOM_Symbol_search: _bindgen_ty_4 = 232;
2324pub const JS_ATOM_Symbol_split: _bindgen_ty_4 = 233;
2325pub const JS_ATOM_Symbol_toStringTag: _bindgen_ty_4 = 234;
2326pub const JS_ATOM_Symbol_isConcatSpreadable: _bindgen_ty_4 = 235;
2327pub const JS_ATOM_Symbol_hasInstance: _bindgen_ty_4 = 236;
2328pub const JS_ATOM_Symbol_species: _bindgen_ty_4 = 237;
2329pub const JS_ATOM_Symbol_unscopables: _bindgen_ty_4 = 238;
2330pub const JS_ATOM_Symbol_asyncIterator: _bindgen_ty_4 = 239;
2331pub const JS_ATOM_Symbol_dispose: _bindgen_ty_4 = 240;
2332pub const JS_ATOM_Symbol_asyncDispose: _bindgen_ty_4 = 241;
2333pub const JS_ATOM_END: _bindgen_ty_4 = 242;
2334pub type _bindgen_ty_4 = ::core::ffi::c_uint;