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}
104pub type JSClassID = u32;
105pub type JSAtom = u32;
106pub const JS_TAG_FIRST: _bindgen_ty_3 = -9;
107pub const JS_TAG_BIG_INT: _bindgen_ty_3 = -9;
108pub const JS_TAG_SYMBOL: _bindgen_ty_3 = -8;
109pub const JS_TAG_STRING: _bindgen_ty_3 = -7;
110pub const JS_TAG_STRING_ROPE: _bindgen_ty_3 = -6;
111pub const JS_TAG_MODULE: _bindgen_ty_3 = -3;
112pub const JS_TAG_FUNCTION_BYTECODE: _bindgen_ty_3 = -2;
113pub const JS_TAG_OBJECT: _bindgen_ty_3 = -1;
114pub const JS_TAG_INT: _bindgen_ty_3 = 0;
115pub const JS_TAG_BOOL: _bindgen_ty_3 = 1;
116pub const JS_TAG_NULL: _bindgen_ty_3 = 2;
117pub const JS_TAG_UNDEFINED: _bindgen_ty_3 = 3;
118pub const JS_TAG_UNINITIALIZED: _bindgen_ty_3 = 4;
119pub const JS_TAG_CATCH_OFFSET: _bindgen_ty_3 = 5;
120pub const JS_TAG_EXCEPTION: _bindgen_ty_3 = 6;
121pub const JS_TAG_SHORT_BIG_INT: _bindgen_ty_3 = 7;
122pub const JS_TAG_FLOAT64: _bindgen_ty_3 = 8;
123pub type _bindgen_ty_3 = ::core::ffi::c_int;
124#[repr(C)]
125#[derive(Copy, Clone)]
126pub union JSValueUnion {
127 pub int32: i32,
128 pub float64: f64,
129 pub ptr: *mut ::core::ffi::c_void,
130 pub short_big_int: i32,
131}
132#[allow(clippy::unnecessary_operation, clippy::identity_op)]
133const _: () = {
134 ["Size of JSValueUnion"][::core::mem::size_of::<JSValueUnion>() - 8usize];
135 ["Alignment of JSValueUnion"][::core::mem::align_of::<JSValueUnion>() - 8usize];
136 ["Offset of field: JSValueUnion::int32"][::core::mem::offset_of!(JSValueUnion, int32) - 0usize];
137 ["Offset of field: JSValueUnion::float64"]
138 [::core::mem::offset_of!(JSValueUnion, float64) - 0usize];
139 ["Offset of field: JSValueUnion::ptr"][::core::mem::offset_of!(JSValueUnion, ptr) - 0usize];
140 ["Offset of field: JSValueUnion::short_big_int"]
141 [::core::mem::offset_of!(JSValueUnion, short_big_int) - 0usize];
142};
143#[repr(C)]
144#[derive(Copy, Clone)]
145pub struct JSValue {
146 pub u: JSValueUnion,
147 pub tag: i64,
148}
149#[allow(clippy::unnecessary_operation, clippy::identity_op)]
150const _: () = {
151 ["Size of JSValue"][::core::mem::size_of::<JSValue>() - 16usize];
152 ["Alignment of JSValue"][::core::mem::align_of::<JSValue>() - 8usize];
153 ["Offset of field: JSValue::u"][::core::mem::offset_of!(JSValue, u) - 0usize];
154 ["Offset of field: JSValue::tag"][::core::mem::offset_of!(JSValue, tag) - 8usize];
155};
156pub type JSCFunction = ::core::option::Option<
157 unsafe extern "C" fn(
158 ctx: *mut JSContext,
159 this_val: JSValue,
160 argc: ::core::ffi::c_int,
161 argv: *mut JSValue,
162 ) -> JSValue,
163>;
164pub type JSCFunctionMagic = ::core::option::Option<
165 unsafe extern "C" fn(
166 ctx: *mut JSContext,
167 this_val: JSValue,
168 argc: ::core::ffi::c_int,
169 argv: *mut JSValue,
170 magic: ::core::ffi::c_int,
171 ) -> JSValue,
172>;
173pub type JSCFunctionData = ::core::option::Option<
174 unsafe extern "C" fn(
175 ctx: *mut JSContext,
176 this_val: JSValue,
177 argc: ::core::ffi::c_int,
178 argv: *mut JSValue,
179 magic: ::core::ffi::c_int,
180 func_data: *mut JSValue,
181 ) -> JSValue,
182>;
183pub type JSCClosure = ::core::option::Option<
184 unsafe extern "C" fn(
185 ctx: *mut JSContext,
186 this_val: JSValue,
187 argc: ::core::ffi::c_int,
188 argv: *mut JSValue,
189 magic: ::core::ffi::c_int,
190 opaque: *mut ::core::ffi::c_void,
191 ) -> JSValue,
192>;
193#[repr(C)]
194#[derive(Debug, Copy, Clone)]
195pub struct JSMallocFunctions {
196 pub js_calloc: ::core::option::Option<
197 unsafe extern "C" fn(
198 opaque: *mut ::core::ffi::c_void,
199 count: size_t,
200 size: size_t,
201 ) -> *mut ::core::ffi::c_void,
202 >,
203 pub js_malloc: ::core::option::Option<
204 unsafe extern "C" fn(
205 opaque: *mut ::core::ffi::c_void,
206 size: size_t,
207 ) -> *mut ::core::ffi::c_void,
208 >,
209 pub js_free: ::core::option::Option<
210 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
211 >,
212 pub js_realloc: ::core::option::Option<
213 unsafe extern "C" fn(
214 opaque: *mut ::core::ffi::c_void,
215 ptr: *mut ::core::ffi::c_void,
216 size: size_t,
217 ) -> *mut ::core::ffi::c_void,
218 >,
219 pub js_malloc_usable_size:
220 ::core::option::Option<unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> size_t>,
221}
222#[allow(clippy::unnecessary_operation, clippy::identity_op)]
223const _: () = {
224 ["Size of JSMallocFunctions"][::core::mem::size_of::<JSMallocFunctions>() - 40usize];
225 ["Alignment of JSMallocFunctions"][::core::mem::align_of::<JSMallocFunctions>() - 8usize];
226 ["Offset of field: JSMallocFunctions::js_calloc"]
227 [::core::mem::offset_of!(JSMallocFunctions, js_calloc) - 0usize];
228 ["Offset of field: JSMallocFunctions::js_malloc"]
229 [::core::mem::offset_of!(JSMallocFunctions, js_malloc) - 8usize];
230 ["Offset of field: JSMallocFunctions::js_free"]
231 [::core::mem::offset_of!(JSMallocFunctions, js_free) - 16usize];
232 ["Offset of field: JSMallocFunctions::js_realloc"]
233 [::core::mem::offset_of!(JSMallocFunctions, js_realloc) - 24usize];
234 ["Offset of field: JSMallocFunctions::js_malloc_usable_size"]
235 [::core::mem::offset_of!(JSMallocFunctions, js_malloc_usable_size) - 32usize];
236};
237pub type JSRuntimeFinalizer =
238 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, arg: *mut ::core::ffi::c_void)>;
239#[repr(C)]
240#[derive(Debug, Copy, Clone)]
241pub struct JSGCObjectHeader {
242 _unused: [u8; 0],
243}
244unsafe extern "C" {
245 pub fn JS_NewRuntime() -> *mut JSRuntime;
246}
247unsafe extern "C" {
248 pub fn JS_SetRuntimeInfo(rt: *mut JSRuntime, info: *const ::core::ffi::c_char);
249}
250unsafe extern "C" {
251 pub fn JS_SetMemoryLimit(rt: *mut JSRuntime, limit: size_t);
252}
253unsafe extern "C" {
254 pub fn JS_SetDumpFlags(rt: *mut JSRuntime, flags: u64);
255}
256unsafe extern "C" {
257 pub fn JS_GetDumpFlags(rt: *mut JSRuntime) -> u64;
258}
259unsafe extern "C" {
260 pub fn JS_GetGCThreshold(rt: *mut JSRuntime) -> size_t;
261}
262unsafe extern "C" {
263 pub fn JS_SetGCThreshold(rt: *mut JSRuntime, gc_threshold: size_t);
264}
265unsafe extern "C" {
266 pub fn JS_SetMaxStackSize(rt: *mut JSRuntime, stack_size: size_t);
267}
268unsafe extern "C" {
269 pub fn JS_UpdateStackTop(rt: *mut JSRuntime);
270}
271unsafe extern "C" {
272 pub fn JS_NewRuntime2(
273 mf: *const JSMallocFunctions,
274 opaque: *mut ::core::ffi::c_void,
275 ) -> *mut JSRuntime;
276}
277unsafe extern "C" {
278 pub fn JS_FreeRuntime(rt: *mut JSRuntime);
279}
280unsafe extern "C" {
281 pub fn JS_GetRuntimeOpaque(rt: *mut JSRuntime) -> *mut ::core::ffi::c_void;
282}
283unsafe extern "C" {
284 pub fn JS_SetRuntimeOpaque(rt: *mut JSRuntime, opaque: *mut ::core::ffi::c_void);
285}
286unsafe extern "C" {
287 pub fn JS_AddRuntimeFinalizer(
288 rt: *mut JSRuntime,
289 finalizer: JSRuntimeFinalizer,
290 arg: *mut ::core::ffi::c_void,
291 ) -> ::core::ffi::c_int;
292}
293pub type JS_MarkFunc =
294 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, gp: *mut JSGCObjectHeader)>;
295unsafe extern "C" {
296 pub fn JS_MarkValue(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc);
297}
298unsafe extern "C" {
299 pub fn JS_RunGC(rt: *mut JSRuntime);
300}
301unsafe extern "C" {
302 pub fn JS_IsLiveObject(rt: *mut JSRuntime, obj: JSValue) -> bool;
303}
304unsafe extern "C" {
305 pub fn JS_NewContext(rt: *mut JSRuntime) -> *mut JSContext;
306}
307unsafe extern "C" {
308 pub fn JS_FreeContext(s: *mut JSContext);
309}
310unsafe extern "C" {
311 pub fn JS_DupContext(ctx: *mut JSContext) -> *mut JSContext;
312}
313unsafe extern "C" {
314 pub fn JS_GetContextOpaque(ctx: *mut JSContext) -> *mut ::core::ffi::c_void;
315}
316unsafe extern "C" {
317 pub fn JS_SetContextOpaque(ctx: *mut JSContext, opaque: *mut ::core::ffi::c_void);
318}
319unsafe extern "C" {
320 pub fn JS_GetRuntime(ctx: *mut JSContext) -> *mut JSRuntime;
321}
322unsafe extern "C" {
323 pub fn JS_SetClassProto(ctx: *mut JSContext, class_id: JSClassID, obj: JSValue);
324}
325unsafe extern "C" {
326 pub fn JS_GetClassProto(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
327}
328unsafe extern "C" {
329 pub fn JS_GetFunctionProto(ctx: *mut JSContext) -> JSValue;
330}
331unsafe extern "C" {
332 pub fn JS_NewContextRaw(rt: *mut JSRuntime) -> *mut JSContext;
333}
334unsafe extern "C" {
335 pub fn JS_AddIntrinsicBaseObjects(ctx: *mut JSContext) -> ::core::ffi::c_int;
336}
337unsafe extern "C" {
338 pub fn JS_AddIntrinsicDate(ctx: *mut JSContext) -> ::core::ffi::c_int;
339}
340unsafe extern "C" {
341 pub fn JS_AddIntrinsicEval(ctx: *mut JSContext) -> ::core::ffi::c_int;
342}
343unsafe extern "C" {
344 pub fn JS_AddIntrinsicRegExpCompiler(ctx: *mut JSContext);
345}
346unsafe extern "C" {
347 pub fn JS_AddIntrinsicRegExp(ctx: *mut JSContext) -> ::core::ffi::c_int;
348}
349unsafe extern "C" {
350 pub fn JS_AddIntrinsicJSON(ctx: *mut JSContext) -> ::core::ffi::c_int;
351}
352unsafe extern "C" {
353 pub fn JS_AddIntrinsicProxy(ctx: *mut JSContext) -> ::core::ffi::c_int;
354}
355unsafe extern "C" {
356 pub fn JS_AddIntrinsicMapSet(ctx: *mut JSContext) -> ::core::ffi::c_int;
357}
358unsafe extern "C" {
359 pub fn JS_AddIntrinsicTypedArrays(ctx: *mut JSContext) -> ::core::ffi::c_int;
360}
361unsafe extern "C" {
362 pub fn JS_AddIntrinsicPromise(ctx: *mut JSContext) -> ::core::ffi::c_int;
363}
364unsafe extern "C" {
365 pub fn JS_AddIntrinsicBigInt(ctx: *mut JSContext) -> ::core::ffi::c_int;
366}
367unsafe extern "C" {
368 pub fn JS_AddIntrinsicWeakRef(ctx: *mut JSContext) -> ::core::ffi::c_int;
369}
370unsafe extern "C" {
371 pub fn JS_AddPerformance(ctx: *mut JSContext) -> ::core::ffi::c_int;
372}
373unsafe extern "C" {
374 pub fn JS_AddIntrinsicDOMException(ctx: *mut JSContext) -> ::core::ffi::c_int;
375}
376unsafe extern "C" {
377 pub fn JS_AddIntrinsicAToB(ctx: *mut JSContext) -> ::core::ffi::c_int;
378}
379unsafe extern "C" {
380 pub fn JS_IsEqual(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> ::core::ffi::c_int;
381}
382unsafe extern "C" {
383 pub fn JS_IsStrictEqual(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
384}
385unsafe extern "C" {
386 pub fn JS_IsSameValue(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
387}
388unsafe extern "C" {
389 pub fn JS_IsSameValueZero(ctx: *mut JSContext, op1: JSValue, op2: JSValue) -> bool;
390}
391unsafe extern "C" {
392 pub fn js_string_codePointRange(
393 ctx: *mut JSContext,
394 this_val: JSValue,
395 argc: ::core::ffi::c_int,
396 argv: *mut JSValue,
397 ) -> JSValue;
398}
399unsafe extern "C" {
400 pub fn js_calloc_rt(
401 rt: *mut JSRuntime,
402 count: size_t,
403 size: size_t,
404 ) -> *mut ::core::ffi::c_void;
405}
406unsafe extern "C" {
407 pub fn js_malloc_rt(rt: *mut JSRuntime, size: size_t) -> *mut ::core::ffi::c_void;
408}
409unsafe extern "C" {
410 pub fn js_free_rt(rt: *mut JSRuntime, ptr: *mut ::core::ffi::c_void);
411}
412unsafe extern "C" {
413 pub fn js_realloc_rt(
414 rt: *mut JSRuntime,
415 ptr: *mut ::core::ffi::c_void,
416 size: size_t,
417 ) -> *mut ::core::ffi::c_void;
418}
419unsafe extern "C" {
420 pub fn js_malloc_usable_size_rt(rt: *mut JSRuntime, ptr: *const ::core::ffi::c_void) -> size_t;
421}
422unsafe extern "C" {
423 pub fn js_mallocz_rt(rt: *mut JSRuntime, size: size_t) -> *mut ::core::ffi::c_void;
424}
425unsafe extern "C" {
426 pub fn js_calloc(ctx: *mut JSContext, count: size_t, size: size_t) -> *mut ::core::ffi::c_void;
427}
428unsafe extern "C" {
429 pub fn js_malloc(ctx: *mut JSContext, size: size_t) -> *mut ::core::ffi::c_void;
430}
431unsafe extern "C" {
432 pub fn js_free(ctx: *mut JSContext, ptr: *mut ::core::ffi::c_void);
433}
434unsafe extern "C" {
435 pub fn js_realloc(
436 ctx: *mut JSContext,
437 ptr: *mut ::core::ffi::c_void,
438 size: size_t,
439 ) -> *mut ::core::ffi::c_void;
440}
441unsafe extern "C" {
442 pub fn js_malloc_usable_size(ctx: *mut JSContext, ptr: *const ::core::ffi::c_void) -> size_t;
443}
444unsafe extern "C" {
445 pub fn js_mallocz(ctx: *mut JSContext, size: size_t) -> *mut ::core::ffi::c_void;
446}
447unsafe extern "C" {
448 pub fn js_strdup(
449 ctx: *mut JSContext,
450 str_: *const ::core::ffi::c_char,
451 ) -> *mut ::core::ffi::c_char;
452}
453unsafe extern "C" {
454 pub fn js_strndup(
455 ctx: *mut JSContext,
456 s: *const ::core::ffi::c_char,
457 n: size_t,
458 ) -> *mut ::core::ffi::c_char;
459}
460#[repr(C)]
461#[derive(Debug, Copy, Clone)]
462pub struct JSMemoryUsage {
463 pub malloc_size: i64,
464 pub malloc_limit: i64,
465 pub memory_used_size: i64,
466 pub malloc_count: i64,
467 pub memory_used_count: i64,
468 pub atom_count: i64,
469 pub atom_size: i64,
470 pub str_count: i64,
471 pub str_size: i64,
472 pub obj_count: i64,
473 pub obj_size: i64,
474 pub prop_count: i64,
475 pub prop_size: i64,
476 pub shape_count: i64,
477 pub shape_size: i64,
478 pub js_func_count: i64,
479 pub js_func_size: i64,
480 pub js_func_code_size: i64,
481 pub js_func_pc2line_count: i64,
482 pub js_func_pc2line_size: i64,
483 pub c_func_count: i64,
484 pub array_count: i64,
485 pub fast_array_count: i64,
486 pub fast_array_elements: i64,
487 pub binary_object_count: i64,
488 pub binary_object_size: i64,
489}
490#[allow(clippy::unnecessary_operation, clippy::identity_op)]
491const _: () = {
492 ["Size of JSMemoryUsage"][::core::mem::size_of::<JSMemoryUsage>() - 208usize];
493 ["Alignment of JSMemoryUsage"][::core::mem::align_of::<JSMemoryUsage>() - 8usize];
494 ["Offset of field: JSMemoryUsage::malloc_size"]
495 [::core::mem::offset_of!(JSMemoryUsage, malloc_size) - 0usize];
496 ["Offset of field: JSMemoryUsage::malloc_limit"]
497 [::core::mem::offset_of!(JSMemoryUsage, malloc_limit) - 8usize];
498 ["Offset of field: JSMemoryUsage::memory_used_size"]
499 [::core::mem::offset_of!(JSMemoryUsage, memory_used_size) - 16usize];
500 ["Offset of field: JSMemoryUsage::malloc_count"]
501 [::core::mem::offset_of!(JSMemoryUsage, malloc_count) - 24usize];
502 ["Offset of field: JSMemoryUsage::memory_used_count"]
503 [::core::mem::offset_of!(JSMemoryUsage, memory_used_count) - 32usize];
504 ["Offset of field: JSMemoryUsage::atom_count"]
505 [::core::mem::offset_of!(JSMemoryUsage, atom_count) - 40usize];
506 ["Offset of field: JSMemoryUsage::atom_size"]
507 [::core::mem::offset_of!(JSMemoryUsage, atom_size) - 48usize];
508 ["Offset of field: JSMemoryUsage::str_count"]
509 [::core::mem::offset_of!(JSMemoryUsage, str_count) - 56usize];
510 ["Offset of field: JSMemoryUsage::str_size"]
511 [::core::mem::offset_of!(JSMemoryUsage, str_size) - 64usize];
512 ["Offset of field: JSMemoryUsage::obj_count"]
513 [::core::mem::offset_of!(JSMemoryUsage, obj_count) - 72usize];
514 ["Offset of field: JSMemoryUsage::obj_size"]
515 [::core::mem::offset_of!(JSMemoryUsage, obj_size) - 80usize];
516 ["Offset of field: JSMemoryUsage::prop_count"]
517 [::core::mem::offset_of!(JSMemoryUsage, prop_count) - 88usize];
518 ["Offset of field: JSMemoryUsage::prop_size"]
519 [::core::mem::offset_of!(JSMemoryUsage, prop_size) - 96usize];
520 ["Offset of field: JSMemoryUsage::shape_count"]
521 [::core::mem::offset_of!(JSMemoryUsage, shape_count) - 104usize];
522 ["Offset of field: JSMemoryUsage::shape_size"]
523 [::core::mem::offset_of!(JSMemoryUsage, shape_size) - 112usize];
524 ["Offset of field: JSMemoryUsage::js_func_count"]
525 [::core::mem::offset_of!(JSMemoryUsage, js_func_count) - 120usize];
526 ["Offset of field: JSMemoryUsage::js_func_size"]
527 [::core::mem::offset_of!(JSMemoryUsage, js_func_size) - 128usize];
528 ["Offset of field: JSMemoryUsage::js_func_code_size"]
529 [::core::mem::offset_of!(JSMemoryUsage, js_func_code_size) - 136usize];
530 ["Offset of field: JSMemoryUsage::js_func_pc2line_count"]
531 [::core::mem::offset_of!(JSMemoryUsage, js_func_pc2line_count) - 144usize];
532 ["Offset of field: JSMemoryUsage::js_func_pc2line_size"]
533 [::core::mem::offset_of!(JSMemoryUsage, js_func_pc2line_size) - 152usize];
534 ["Offset of field: JSMemoryUsage::c_func_count"]
535 [::core::mem::offset_of!(JSMemoryUsage, c_func_count) - 160usize];
536 ["Offset of field: JSMemoryUsage::array_count"]
537 [::core::mem::offset_of!(JSMemoryUsage, array_count) - 168usize];
538 ["Offset of field: JSMemoryUsage::fast_array_count"]
539 [::core::mem::offset_of!(JSMemoryUsage, fast_array_count) - 176usize];
540 ["Offset of field: JSMemoryUsage::fast_array_elements"]
541 [::core::mem::offset_of!(JSMemoryUsage, fast_array_elements) - 184usize];
542 ["Offset of field: JSMemoryUsage::binary_object_count"]
543 [::core::mem::offset_of!(JSMemoryUsage, binary_object_count) - 192usize];
544 ["Offset of field: JSMemoryUsage::binary_object_size"]
545 [::core::mem::offset_of!(JSMemoryUsage, binary_object_size) - 200usize];
546};
547unsafe extern "C" {
548 pub fn JS_ComputeMemoryUsage(rt: *mut JSRuntime, s: *mut JSMemoryUsage);
549}
550unsafe extern "C" {
551 pub fn JS_NewAtomLen(
552 ctx: *mut JSContext,
553 str_: *const ::core::ffi::c_char,
554 len: size_t,
555 ) -> JSAtom;
556}
557unsafe extern "C" {
558 pub fn JS_NewAtom(ctx: *mut JSContext, str_: *const ::core::ffi::c_char) -> JSAtom;
559}
560unsafe extern "C" {
561 pub fn JS_NewAtomUInt32(ctx: *mut JSContext, n: u32) -> JSAtom;
562}
563unsafe extern "C" {
564 pub fn JS_DupAtom(ctx: *mut JSContext, v: JSAtom) -> JSAtom;
565}
566unsafe extern "C" {
567 pub fn JS_DupAtomRT(rt: *mut JSRuntime, v: JSAtom) -> JSAtom;
568}
569unsafe extern "C" {
570 pub fn JS_FreeAtom(ctx: *mut JSContext, v: JSAtom);
571}
572unsafe extern "C" {
573 pub fn JS_FreeAtomRT(rt: *mut JSRuntime, v: JSAtom);
574}
575unsafe extern "C" {
576 pub fn JS_AtomToValue(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
577}
578unsafe extern "C" {
579 pub fn JS_AtomToString(ctx: *mut JSContext, atom: JSAtom) -> JSValue;
580}
581unsafe extern "C" {
582 pub fn JS_AtomToCStringLen(
583 ctx: *mut JSContext,
584 plen: *mut size_t,
585 atom: JSAtom,
586 ) -> *const ::core::ffi::c_char;
587}
588unsafe extern "C" {
589 pub fn JS_ValueToAtom(ctx: *mut JSContext, val: JSValue) -> JSAtom;
590}
591#[repr(C)]
592#[derive(Debug, Copy, Clone)]
593pub struct JSPropertyEnum {
594 pub is_enumerable: bool,
595 pub atom: JSAtom,
596}
597#[allow(clippy::unnecessary_operation, clippy::identity_op)]
598const _: () = {
599 ["Size of JSPropertyEnum"][::core::mem::size_of::<JSPropertyEnum>() - 8usize];
600 ["Alignment of JSPropertyEnum"][::core::mem::align_of::<JSPropertyEnum>() - 4usize];
601 ["Offset of field: JSPropertyEnum::is_enumerable"]
602 [::core::mem::offset_of!(JSPropertyEnum, is_enumerable) - 0usize];
603 ["Offset of field: JSPropertyEnum::atom"]
604 [::core::mem::offset_of!(JSPropertyEnum, atom) - 4usize];
605};
606#[repr(C)]
607#[derive(Copy, Clone)]
608pub struct JSPropertyDescriptor {
609 pub flags: ::core::ffi::c_int,
610 pub value: JSValue,
611 pub getter: JSValue,
612 pub setter: JSValue,
613}
614#[allow(clippy::unnecessary_operation, clippy::identity_op)]
615const _: () = {
616 ["Size of JSPropertyDescriptor"][::core::mem::size_of::<JSPropertyDescriptor>() - 56usize];
617 ["Alignment of JSPropertyDescriptor"][::core::mem::align_of::<JSPropertyDescriptor>() - 8usize];
618 ["Offset of field: JSPropertyDescriptor::flags"]
619 [::core::mem::offset_of!(JSPropertyDescriptor, flags) - 0usize];
620 ["Offset of field: JSPropertyDescriptor::value"]
621 [::core::mem::offset_of!(JSPropertyDescriptor, value) - 8usize];
622 ["Offset of field: JSPropertyDescriptor::getter"]
623 [::core::mem::offset_of!(JSPropertyDescriptor, getter) - 24usize];
624 ["Offset of field: JSPropertyDescriptor::setter"]
625 [::core::mem::offset_of!(JSPropertyDescriptor, setter) - 40usize];
626};
627#[repr(C)]
628#[derive(Debug, Copy, Clone)]
629pub struct JSClassExoticMethods {
630 pub get_own_property: ::core::option::Option<
631 unsafe extern "C" fn(
632 ctx: *mut JSContext,
633 desc: *mut JSPropertyDescriptor,
634 obj: JSValue,
635 prop: JSAtom,
636 ) -> ::core::ffi::c_int,
637 >,
638 pub get_own_property_names: ::core::option::Option<
639 unsafe extern "C" fn(
640 ctx: *mut JSContext,
641 ptab: *mut *mut JSPropertyEnum,
642 plen: *mut u32,
643 obj: JSValue,
644 ) -> ::core::ffi::c_int,
645 >,
646 pub delete_property: ::core::option::Option<
647 unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue, prop: JSAtom) -> ::core::ffi::c_int,
648 >,
649 pub define_own_property: ::core::option::Option<
650 unsafe extern "C" fn(
651 ctx: *mut JSContext,
652 this_obj: JSValue,
653 prop: JSAtom,
654 val: JSValue,
655 getter: JSValue,
656 setter: JSValue,
657 flags: ::core::ffi::c_int,
658 ) -> ::core::ffi::c_int,
659 >,
660 pub has_property: ::core::option::Option<
661 unsafe extern "C" fn(ctx: *mut JSContext, obj: JSValue, atom: JSAtom) -> ::core::ffi::c_int,
662 >,
663 pub get_property: ::core::option::Option<
664 unsafe extern "C" fn(
665 ctx: *mut JSContext,
666 obj: JSValue,
667 atom: JSAtom,
668 receiver: JSValue,
669 ) -> JSValue,
670 >,
671 pub set_property: ::core::option::Option<
672 unsafe extern "C" fn(
673 ctx: *mut JSContext,
674 obj: JSValue,
675 atom: JSAtom,
676 value: JSValue,
677 receiver: JSValue,
678 flags: ::core::ffi::c_int,
679 ) -> ::core::ffi::c_int,
680 >,
681}
682#[allow(clippy::unnecessary_operation, clippy::identity_op)]
683const _: () = {
684 ["Size of JSClassExoticMethods"][::core::mem::size_of::<JSClassExoticMethods>() - 56usize];
685 ["Alignment of JSClassExoticMethods"][::core::mem::align_of::<JSClassExoticMethods>() - 8usize];
686 ["Offset of field: JSClassExoticMethods::get_own_property"]
687 [::core::mem::offset_of!(JSClassExoticMethods, get_own_property) - 0usize];
688 ["Offset of field: JSClassExoticMethods::get_own_property_names"]
689 [::core::mem::offset_of!(JSClassExoticMethods, get_own_property_names) - 8usize];
690 ["Offset of field: JSClassExoticMethods::delete_property"]
691 [::core::mem::offset_of!(JSClassExoticMethods, delete_property) - 16usize];
692 ["Offset of field: JSClassExoticMethods::define_own_property"]
693 [::core::mem::offset_of!(JSClassExoticMethods, define_own_property) - 24usize];
694 ["Offset of field: JSClassExoticMethods::has_property"]
695 [::core::mem::offset_of!(JSClassExoticMethods, has_property) - 32usize];
696 ["Offset of field: JSClassExoticMethods::get_property"]
697 [::core::mem::offset_of!(JSClassExoticMethods, get_property) - 40usize];
698 ["Offset of field: JSClassExoticMethods::set_property"]
699 [::core::mem::offset_of!(JSClassExoticMethods, set_property) - 48usize];
700};
701pub type JSClassFinalizer =
702 ::core::option::Option<unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue)>;
703pub type JSClassGCMark = ::core::option::Option<
704 unsafe extern "C" fn(rt: *mut JSRuntime, val: JSValue, mark_func: JS_MarkFunc),
705>;
706pub type JSClassCall = ::core::option::Option<
707 unsafe extern "C" fn(
708 ctx: *mut JSContext,
709 func_obj: JSValue,
710 this_val: JSValue,
711 argc: ::core::ffi::c_int,
712 argv: *mut JSValue,
713 flags: ::core::ffi::c_int,
714 ) -> JSValue,
715>;
716#[repr(C)]
717#[derive(Debug, Copy, Clone)]
718pub struct JSClassDef {
719 pub class_name: *const ::core::ffi::c_char,
720 pub finalizer: JSClassFinalizer,
721 pub gc_mark: JSClassGCMark,
722 pub call: JSClassCall,
723 pub exotic: *mut JSClassExoticMethods,
724}
725#[allow(clippy::unnecessary_operation, clippy::identity_op)]
726const _: () = {
727 ["Size of JSClassDef"][::core::mem::size_of::<JSClassDef>() - 40usize];
728 ["Alignment of JSClassDef"][::core::mem::align_of::<JSClassDef>() - 8usize];
729 ["Offset of field: JSClassDef::class_name"]
730 [::core::mem::offset_of!(JSClassDef, class_name) - 0usize];
731 ["Offset of field: JSClassDef::finalizer"]
732 [::core::mem::offset_of!(JSClassDef, finalizer) - 8usize];
733 ["Offset of field: JSClassDef::gc_mark"]
734 [::core::mem::offset_of!(JSClassDef, gc_mark) - 16usize];
735 ["Offset of field: JSClassDef::call"][::core::mem::offset_of!(JSClassDef, call) - 24usize];
736 ["Offset of field: JSClassDef::exotic"][::core::mem::offset_of!(JSClassDef, exotic) - 32usize];
737};
738#[repr(C)]
739#[derive(Debug, Copy, Clone)]
740pub struct JSEvalOptions {
741 pub version: ::core::ffi::c_int,
742 pub eval_flags: ::core::ffi::c_int,
743 pub filename: *const ::core::ffi::c_char,
744 pub line_num: ::core::ffi::c_int,
745}
746#[allow(clippy::unnecessary_operation, clippy::identity_op)]
747const _: () = {
748 ["Size of JSEvalOptions"][::core::mem::size_of::<JSEvalOptions>() - 24usize];
749 ["Alignment of JSEvalOptions"][::core::mem::align_of::<JSEvalOptions>() - 8usize];
750 ["Offset of field: JSEvalOptions::version"]
751 [::core::mem::offset_of!(JSEvalOptions, version) - 0usize];
752 ["Offset of field: JSEvalOptions::eval_flags"]
753 [::core::mem::offset_of!(JSEvalOptions, eval_flags) - 4usize];
754 ["Offset of field: JSEvalOptions::filename"]
755 [::core::mem::offset_of!(JSEvalOptions, filename) - 8usize];
756 ["Offset of field: JSEvalOptions::line_num"]
757 [::core::mem::offset_of!(JSEvalOptions, line_num) - 16usize];
758};
759unsafe extern "C" {
760 pub fn JS_NewClassID(rt: *mut JSRuntime, pclass_id: *mut JSClassID) -> JSClassID;
761}
762unsafe extern "C" {
763 pub fn JS_GetClassID(v: JSValue) -> JSClassID;
764}
765unsafe extern "C" {
766 pub fn JS_NewClass(
767 rt: *mut JSRuntime,
768 class_id: JSClassID,
769 class_def: *const JSClassDef,
770 ) -> ::core::ffi::c_int;
771}
772unsafe extern "C" {
773 pub fn JS_IsRegisteredClass(rt: *mut JSRuntime, class_id: JSClassID) -> bool;
774}
775unsafe extern "C" {
776 pub fn JS_GetClassName(rt: *mut JSRuntime, class_id: JSClassID) -> JSAtom;
777}
778unsafe extern "C" {
779 pub fn JS_NewNumber(ctx: *mut JSContext, d: f64) -> JSValue;
780}
781unsafe extern "C" {
782 pub fn JS_NewBigInt64(ctx: *mut JSContext, v: i64) -> JSValue;
783}
784unsafe extern "C" {
785 pub fn JS_NewBigUint64(ctx: *mut JSContext, v: u64) -> JSValue;
786}
787unsafe extern "C" {
788 pub fn JS_Throw(ctx: *mut JSContext, obj: JSValue) -> JSValue;
789}
790unsafe extern "C" {
791 pub fn JS_GetException(ctx: *mut JSContext) -> JSValue;
792}
793unsafe extern "C" {
794 pub fn JS_HasException(ctx: *mut JSContext) -> bool;
795}
796unsafe extern "C" {
797 pub fn JS_IsError(val: JSValue) -> bool;
798}
799unsafe extern "C" {
800 pub fn JS_IsUncatchableError(val: JSValue) -> bool;
801}
802unsafe extern "C" {
803 pub fn JS_SetUncatchableError(ctx: *mut JSContext, val: JSValue);
804}
805unsafe extern "C" {
806 pub fn JS_ClearUncatchableError(ctx: *mut JSContext, val: JSValue);
807}
808unsafe extern "C" {
809 pub fn JS_ResetUncatchableError(ctx: *mut JSContext);
810}
811unsafe extern "C" {
812 pub fn JS_NewError(ctx: *mut JSContext) -> JSValue;
813}
814unsafe extern "C" {
815 pub fn JS_NewInternalError(
816 ctx: *mut JSContext,
817 fmt: *const ::core::ffi::c_char,
818 ...
819 ) -> JSValue;
820}
821unsafe extern "C" {
822 pub fn JS_NewPlainError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
823}
824unsafe extern "C" {
825 pub fn JS_NewRangeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
826}
827unsafe extern "C" {
828 pub fn JS_NewReferenceError(
829 ctx: *mut JSContext,
830 fmt: *const ::core::ffi::c_char,
831 ...
832 ) -> JSValue;
833}
834unsafe extern "C" {
835 pub fn JS_NewSyntaxError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
836}
837unsafe extern "C" {
838 pub fn JS_NewTypeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
839}
840unsafe extern "C" {
841 pub fn JS_ThrowInternalError(
842 ctx: *mut JSContext,
843 fmt: *const ::core::ffi::c_char,
844 ...
845 ) -> JSValue;
846}
847unsafe extern "C" {
848 pub fn JS_ThrowPlainError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...)
849 -> JSValue;
850}
851unsafe extern "C" {
852 pub fn JS_ThrowRangeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...)
853 -> JSValue;
854}
855unsafe extern "C" {
856 pub fn JS_ThrowReferenceError(
857 ctx: *mut JSContext,
858 fmt: *const ::core::ffi::c_char,
859 ...
860 ) -> JSValue;
861}
862unsafe extern "C" {
863 pub fn JS_ThrowSyntaxError(
864 ctx: *mut JSContext,
865 fmt: *const ::core::ffi::c_char,
866 ...
867 ) -> JSValue;
868}
869unsafe extern "C" {
870 pub fn JS_ThrowTypeError(ctx: *mut JSContext, fmt: *const ::core::ffi::c_char, ...) -> JSValue;
871}
872unsafe extern "C" {
873 pub fn JS_ThrowDOMException(
874 ctx: *mut JSContext,
875 name: *const ::core::ffi::c_char,
876 fmt: *const ::core::ffi::c_char,
877 ...
878 ) -> JSValue;
879}
880unsafe extern "C" {
881 pub fn JS_ThrowOutOfMemory(ctx: *mut JSContext) -> JSValue;
882}
883unsafe extern "C" {
884 pub fn JS_FreeValue(ctx: *mut JSContext, v: JSValue);
885}
886unsafe extern "C" {
887 pub fn JS_FreeValueRT(rt: *mut JSRuntime, v: JSValue);
888}
889unsafe extern "C" {
890 pub fn JS_DupValue(ctx: *mut JSContext, v: JSValue) -> JSValue;
891}
892unsafe extern "C" {
893 pub fn JS_DupValueRT(rt: *mut JSRuntime, v: JSValue) -> JSValue;
894}
895unsafe extern "C" {
896 pub fn JS_ToBool(ctx: *mut JSContext, val: JSValue) -> ::core::ffi::c_int;
897}
898unsafe extern "C" {
899 pub fn JS_ToNumber(ctx: *mut JSContext, val: JSValue) -> JSValue;
900}
901unsafe extern "C" {
902 pub fn JS_ToInt32(ctx: *mut JSContext, pres: *mut i32, val: JSValue) -> ::core::ffi::c_int;
903}
904unsafe extern "C" {
905 pub fn JS_ToInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
906}
907unsafe extern "C" {
908 pub fn JS_ToIndex(ctx: *mut JSContext, plen: *mut u64, val: JSValue) -> ::core::ffi::c_int;
909}
910unsafe extern "C" {
911 pub fn JS_ToFloat64(ctx: *mut JSContext, pres: *mut f64, val: JSValue) -> ::core::ffi::c_int;
912}
913unsafe extern "C" {
914 pub fn JS_ToBigInt64(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
915}
916unsafe extern "C" {
917 pub fn JS_ToBigUint64(ctx: *mut JSContext, pres: *mut u64, val: JSValue) -> ::core::ffi::c_int;
918}
919unsafe extern "C" {
920 pub fn JS_ToInt64Ext(ctx: *mut JSContext, pres: *mut i64, val: JSValue) -> ::core::ffi::c_int;
921}
922unsafe extern "C" {
923 pub fn JS_NewStringLen(
924 ctx: *mut JSContext,
925 str1: *const ::core::ffi::c_char,
926 len1: size_t,
927 ) -> JSValue;
928}
929unsafe extern "C" {
930 pub fn JS_NewStringUTF16(ctx: *mut JSContext, buf: *const u16, len: size_t) -> JSValue;
931}
932unsafe extern "C" {
933 pub fn JS_NewAtomString(ctx: *mut JSContext, str_: *const ::core::ffi::c_char) -> JSValue;
934}
935unsafe extern "C" {
936 pub fn JS_ToString(ctx: *mut JSContext, val: JSValue) -> JSValue;
937}
938unsafe extern "C" {
939 pub fn JS_ToPropertyKey(ctx: *mut JSContext, val: JSValue) -> JSValue;
940}
941unsafe extern "C" {
942 pub fn JS_ToCStringLen2(
943 ctx: *mut JSContext,
944 plen: *mut size_t,
945 val1: JSValue,
946 cesu8: bool,
947 ) -> *const ::core::ffi::c_char;
948}
949unsafe extern "C" {
950 pub fn JS_ToCStringLenUTF16(
951 ctx: *mut JSContext,
952 plen: *mut size_t,
953 val1: JSValue,
954 ) -> *const u16;
955}
956unsafe extern "C" {
957 pub fn JS_FreeCString(ctx: *mut JSContext, ptr: *const ::core::ffi::c_char);
958}
959unsafe extern "C" {
960 pub fn JS_FreeCStringRT(rt: *mut JSRuntime, ptr: *const ::core::ffi::c_char);
961}
962unsafe extern "C" {
963 pub fn JS_FreeCStringUTF16(ctx: *mut JSContext, ptr: *const u16);
964}
965unsafe extern "C" {
966 pub fn JS_FreeCStringRT_UTF16(rt: *mut JSRuntime, ptr: *const u16);
967}
968unsafe extern "C" {
969 pub fn JS_NewObjectProtoClass(
970 ctx: *mut JSContext,
971 proto: JSValue,
972 class_id: JSClassID,
973 ) -> JSValue;
974}
975unsafe extern "C" {
976 pub fn JS_NewObjectClass(ctx: *mut JSContext, class_id: JSClassID) -> JSValue;
977}
978unsafe extern "C" {
979 pub fn JS_NewObjectProto(ctx: *mut JSContext, proto: JSValue) -> JSValue;
980}
981unsafe extern "C" {
982 pub fn JS_NewObject(ctx: *mut JSContext) -> JSValue;
983}
984unsafe extern "C" {
985 pub fn JS_NewObjectFrom(
986 ctx: *mut JSContext,
987 count: ::core::ffi::c_int,
988 props: *const JSAtom,
989 values: *const JSValue,
990 ) -> JSValue;
991}
992unsafe extern "C" {
993 pub fn JS_NewObjectFromStr(
994 ctx: *mut JSContext,
995 count: ::core::ffi::c_int,
996 props: *mut *const ::core::ffi::c_char,
997 values: *const JSValue,
998 ) -> JSValue;
999}
1000unsafe extern "C" {
1001 pub fn JS_ToObject(ctx: *mut JSContext, val: JSValue) -> JSValue;
1002}
1003unsafe extern "C" {
1004 pub fn JS_ToObjectString(ctx: *mut JSContext, val: JSValue) -> JSValue;
1005}
1006unsafe extern "C" {
1007 pub fn JS_IsFunction(ctx: *mut JSContext, val: JSValue) -> bool;
1008}
1009unsafe extern "C" {
1010 pub fn JS_IsAsyncFunction(val: JSValue) -> bool;
1011}
1012unsafe extern "C" {
1013 pub fn JS_IsConstructor(ctx: *mut JSContext, val: JSValue) -> bool;
1014}
1015unsafe extern "C" {
1016 pub fn JS_SetConstructorBit(ctx: *mut JSContext, func_obj: JSValue, val: bool) -> bool;
1017}
1018unsafe extern "C" {
1019 pub fn JS_IsRegExp(val: JSValue) -> bool;
1020}
1021unsafe extern "C" {
1022 pub fn JS_IsMap(val: JSValue) -> bool;
1023}
1024unsafe extern "C" {
1025 pub fn JS_IsSet(val: JSValue) -> bool;
1026}
1027unsafe extern "C" {
1028 pub fn JS_IsWeakRef(val: JSValue) -> bool;
1029}
1030unsafe extern "C" {
1031 pub fn JS_IsWeakSet(val: JSValue) -> bool;
1032}
1033unsafe extern "C" {
1034 pub fn JS_IsWeakMap(val: JSValue) -> bool;
1035}
1036unsafe extern "C" {
1037 pub fn JS_IsDataView(val: JSValue) -> bool;
1038}
1039unsafe extern "C" {
1040 pub fn JS_NewArray(ctx: *mut JSContext) -> JSValue;
1041}
1042unsafe extern "C" {
1043 pub fn JS_NewArrayFrom(
1044 ctx: *mut JSContext,
1045 count: ::core::ffi::c_int,
1046 values: *const JSValue,
1047 ) -> JSValue;
1048}
1049unsafe extern "C" {
1050 pub fn JS_IsArray(val: JSValue) -> bool;
1051}
1052unsafe extern "C" {
1053 pub fn JS_IsProxy(val: JSValue) -> bool;
1054}
1055unsafe extern "C" {
1056 pub fn JS_GetProxyTarget(ctx: *mut JSContext, proxy: JSValue) -> JSValue;
1057}
1058unsafe extern "C" {
1059 pub fn JS_GetProxyHandler(ctx: *mut JSContext, proxy: JSValue) -> JSValue;
1060}
1061unsafe extern "C" {
1062 pub fn JS_NewProxy(ctx: *mut JSContext, target: JSValue, handler: JSValue) -> JSValue;
1063}
1064unsafe extern "C" {
1065 pub fn JS_NewDate(ctx: *mut JSContext, epoch_ms: f64) -> JSValue;
1066}
1067unsafe extern "C" {
1068 pub fn JS_IsDate(v: JSValue) -> bool;
1069}
1070unsafe extern "C" {
1071 pub fn JS_GetProperty(ctx: *mut JSContext, this_obj: JSValue, prop: JSAtom) -> JSValue;
1072}
1073unsafe extern "C" {
1074 pub fn JS_GetPropertyUint32(ctx: *mut JSContext, this_obj: JSValue, idx: u32) -> JSValue;
1075}
1076unsafe extern "C" {
1077 pub fn JS_GetPropertyInt64(ctx: *mut JSContext, this_obj: JSValue, idx: i64) -> JSValue;
1078}
1079unsafe extern "C" {
1080 pub fn JS_GetPropertyStr(
1081 ctx: *mut JSContext,
1082 this_obj: JSValue,
1083 prop: *const ::core::ffi::c_char,
1084 ) -> JSValue;
1085}
1086unsafe extern "C" {
1087 pub fn JS_SetProperty(
1088 ctx: *mut JSContext,
1089 this_obj: JSValue,
1090 prop: JSAtom,
1091 val: JSValue,
1092 ) -> ::core::ffi::c_int;
1093}
1094unsafe extern "C" {
1095 pub fn JS_SetPropertyUint32(
1096 ctx: *mut JSContext,
1097 this_obj: JSValue,
1098 idx: u32,
1099 val: JSValue,
1100 ) -> ::core::ffi::c_int;
1101}
1102unsafe extern "C" {
1103 pub fn JS_SetPropertyInt64(
1104 ctx: *mut JSContext,
1105 this_obj: JSValue,
1106 idx: i64,
1107 val: JSValue,
1108 ) -> ::core::ffi::c_int;
1109}
1110unsafe extern "C" {
1111 pub fn JS_SetPropertyStr(
1112 ctx: *mut JSContext,
1113 this_obj: JSValue,
1114 prop: *const ::core::ffi::c_char,
1115 val: JSValue,
1116 ) -> ::core::ffi::c_int;
1117}
1118unsafe extern "C" {
1119 pub fn JS_HasProperty(
1120 ctx: *mut JSContext,
1121 this_obj: JSValue,
1122 prop: JSAtom,
1123 ) -> ::core::ffi::c_int;
1124}
1125unsafe extern "C" {
1126 pub fn JS_IsExtensible(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1127}
1128unsafe extern "C" {
1129 pub fn JS_PreventExtensions(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1130}
1131unsafe extern "C" {
1132 pub fn JS_DeleteProperty(
1133 ctx: *mut JSContext,
1134 obj: JSValue,
1135 prop: JSAtom,
1136 flags: ::core::ffi::c_int,
1137 ) -> ::core::ffi::c_int;
1138}
1139unsafe extern "C" {
1140 pub fn JS_SetPrototype(
1141 ctx: *mut JSContext,
1142 obj: JSValue,
1143 proto_val: JSValue,
1144 ) -> ::core::ffi::c_int;
1145}
1146unsafe extern "C" {
1147 pub fn JS_GetPrototype(ctx: *mut JSContext, val: JSValue) -> JSValue;
1148}
1149unsafe extern "C" {
1150 pub fn JS_GetLength(ctx: *mut JSContext, obj: JSValue, pres: *mut i64) -> ::core::ffi::c_int;
1151}
1152unsafe extern "C" {
1153 pub fn JS_SetLength(ctx: *mut JSContext, obj: JSValue, len: i64) -> ::core::ffi::c_int;
1154}
1155unsafe extern "C" {
1156 pub fn JS_SealObject(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1157}
1158unsafe extern "C" {
1159 pub fn JS_FreezeObject(ctx: *mut JSContext, obj: JSValue) -> ::core::ffi::c_int;
1160}
1161unsafe extern "C" {
1162 pub fn JS_GetOwnPropertyNames(
1163 ctx: *mut JSContext,
1164 ptab: *mut *mut JSPropertyEnum,
1165 plen: *mut u32,
1166 obj: JSValue,
1167 flags: ::core::ffi::c_int,
1168 ) -> ::core::ffi::c_int;
1169}
1170unsafe extern "C" {
1171 pub fn JS_GetOwnProperty(
1172 ctx: *mut JSContext,
1173 desc: *mut JSPropertyDescriptor,
1174 obj: JSValue,
1175 prop: JSAtom,
1176 ) -> ::core::ffi::c_int;
1177}
1178unsafe extern "C" {
1179 pub fn JS_FreePropertyEnum(ctx: *mut JSContext, tab: *mut JSPropertyEnum, len: u32);
1180}
1181unsafe extern "C" {
1182 pub fn JS_Call(
1183 ctx: *mut JSContext,
1184 func_obj: JSValue,
1185 this_obj: JSValue,
1186 argc: ::core::ffi::c_int,
1187 argv: *mut JSValue,
1188 ) -> JSValue;
1189}
1190unsafe extern "C" {
1191 pub fn JS_Invoke(
1192 ctx: *mut JSContext,
1193 this_val: JSValue,
1194 atom: JSAtom,
1195 argc: ::core::ffi::c_int,
1196 argv: *mut JSValue,
1197 ) -> JSValue;
1198}
1199unsafe extern "C" {
1200 pub fn JS_CallConstructor(
1201 ctx: *mut JSContext,
1202 func_obj: JSValue,
1203 argc: ::core::ffi::c_int,
1204 argv: *mut JSValue,
1205 ) -> JSValue;
1206}
1207unsafe extern "C" {
1208 pub fn JS_CallConstructor2(
1209 ctx: *mut JSContext,
1210 func_obj: JSValue,
1211 new_target: JSValue,
1212 argc: ::core::ffi::c_int,
1213 argv: *mut JSValue,
1214 ) -> JSValue;
1215}
1216unsafe extern "C" {
1217 pub fn JS_DetectModule(input: *const ::core::ffi::c_char, input_len: size_t) -> bool;
1218}
1219unsafe extern "C" {
1220 pub fn JS_Eval(
1221 ctx: *mut JSContext,
1222 input: *const ::core::ffi::c_char,
1223 input_len: size_t,
1224 filename: *const ::core::ffi::c_char,
1225 eval_flags: ::core::ffi::c_int,
1226 ) -> JSValue;
1227}
1228unsafe extern "C" {
1229 pub fn JS_Eval2(
1230 ctx: *mut JSContext,
1231 input: *const ::core::ffi::c_char,
1232 input_len: size_t,
1233 options: *mut JSEvalOptions,
1234 ) -> JSValue;
1235}
1236unsafe extern "C" {
1237 pub fn JS_EvalThis(
1238 ctx: *mut JSContext,
1239 this_obj: JSValue,
1240 input: *const ::core::ffi::c_char,
1241 input_len: size_t,
1242 filename: *const ::core::ffi::c_char,
1243 eval_flags: ::core::ffi::c_int,
1244 ) -> JSValue;
1245}
1246unsafe extern "C" {
1247 pub fn JS_EvalThis2(
1248 ctx: *mut JSContext,
1249 this_obj: JSValue,
1250 input: *const ::core::ffi::c_char,
1251 input_len: size_t,
1252 options: *mut JSEvalOptions,
1253 ) -> JSValue;
1254}
1255unsafe extern "C" {
1256 pub fn JS_GetGlobalObject(ctx: *mut JSContext) -> JSValue;
1257}
1258unsafe extern "C" {
1259 pub fn JS_IsInstanceOf(ctx: *mut JSContext, val: JSValue, obj: JSValue) -> ::core::ffi::c_int;
1260}
1261unsafe extern "C" {
1262 pub fn JS_DefineProperty(
1263 ctx: *mut JSContext,
1264 this_obj: JSValue,
1265 prop: JSAtom,
1266 val: JSValue,
1267 getter: JSValue,
1268 setter: JSValue,
1269 flags: ::core::ffi::c_int,
1270 ) -> ::core::ffi::c_int;
1271}
1272unsafe extern "C" {
1273 pub fn JS_DefinePropertyValue(
1274 ctx: *mut JSContext,
1275 this_obj: JSValue,
1276 prop: JSAtom,
1277 val: JSValue,
1278 flags: ::core::ffi::c_int,
1279 ) -> ::core::ffi::c_int;
1280}
1281unsafe extern "C" {
1282 pub fn JS_DefinePropertyValueUint32(
1283 ctx: *mut JSContext,
1284 this_obj: JSValue,
1285 idx: u32,
1286 val: JSValue,
1287 flags: ::core::ffi::c_int,
1288 ) -> ::core::ffi::c_int;
1289}
1290unsafe extern "C" {
1291 pub fn JS_DefinePropertyValueStr(
1292 ctx: *mut JSContext,
1293 this_obj: JSValue,
1294 prop: *const ::core::ffi::c_char,
1295 val: JSValue,
1296 flags: ::core::ffi::c_int,
1297 ) -> ::core::ffi::c_int;
1298}
1299unsafe extern "C" {
1300 pub fn JS_DefinePropertyGetSet(
1301 ctx: *mut JSContext,
1302 this_obj: JSValue,
1303 prop: JSAtom,
1304 getter: JSValue,
1305 setter: JSValue,
1306 flags: ::core::ffi::c_int,
1307 ) -> ::core::ffi::c_int;
1308}
1309unsafe extern "C" {
1310 pub fn JS_SetOpaque(obj: JSValue, opaque: *mut ::core::ffi::c_void) -> ::core::ffi::c_int;
1311}
1312unsafe extern "C" {
1313 pub fn JS_GetOpaque(obj: JSValue, class_id: JSClassID) -> *mut ::core::ffi::c_void;
1314}
1315unsafe extern "C" {
1316 pub fn JS_GetOpaque2(
1317 ctx: *mut JSContext,
1318 obj: JSValue,
1319 class_id: JSClassID,
1320 ) -> *mut ::core::ffi::c_void;
1321}
1322unsafe extern "C" {
1323 pub fn JS_GetAnyOpaque(obj: JSValue, class_id: *mut JSClassID) -> *mut ::core::ffi::c_void;
1324}
1325unsafe extern "C" {
1326 pub fn JS_ParseJSON(
1327 ctx: *mut JSContext,
1328 buf: *const ::core::ffi::c_char,
1329 buf_len: size_t,
1330 filename: *const ::core::ffi::c_char,
1331 ) -> JSValue;
1332}
1333unsafe extern "C" {
1334 pub fn JS_JSONStringify(
1335 ctx: *mut JSContext,
1336 obj: JSValue,
1337 replacer: JSValue,
1338 space0: JSValue,
1339 ) -> JSValue;
1340}
1341pub type JSReallocArrayBufferDataFunc = ::core::option::Option<
1342 unsafe extern "C" fn(
1343 rt: *mut JSRuntime,
1344 opaque: *mut ::core::ffi::c_void,
1345 ptr: *mut ::core::ffi::c_void,
1346 size: size_t,
1347 ) -> *mut ::core::ffi::c_void,
1348>;
1349unsafe extern "C" {
1350 pub fn JS_NewArrayBuffer(
1351 ctx: *mut JSContext,
1352 buf: *mut u8,
1353 len: size_t,
1354 max_len: size_t,
1355 realloc_func: JSReallocArrayBufferDataFunc,
1356 opaque: *mut ::core::ffi::c_void,
1357 is_shared: bool,
1358 ) -> JSValue;
1359}
1360unsafe extern "C" {
1361 pub fn JS_NewArrayBufferCopy(ctx: *mut JSContext, buf: *const u8, len: size_t) -> JSValue;
1362}
1363unsafe extern "C" {
1364 pub fn JS_DetachArrayBuffer(ctx: *mut JSContext, obj: JSValue);
1365}
1366unsafe extern "C" {
1367 pub fn JS_GetArrayBuffer(ctx: *mut JSContext, psize: *mut size_t, obj: JSValue) -> *mut u8;
1368}
1369unsafe extern "C" {
1370 pub fn JS_IsArrayBuffer(obj: JSValue) -> bool;
1371}
1372unsafe extern "C" {
1373 pub fn JS_IsImmutableArrayBuffer(obj: JSValue) -> ::core::ffi::c_int;
1374}
1375unsafe extern "C" {
1376 pub fn JS_SetImmutableArrayBuffer(obj: JSValue, immutable: bool) -> ::core::ffi::c_int;
1377}
1378unsafe extern "C" {
1379 pub fn JS_GetUint8Array(ctx: *mut JSContext, psize: *mut size_t, obj: JSValue) -> *mut u8;
1380}
1381pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8C: JSTypedArrayEnum = 0;
1382pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT8: JSTypedArrayEnum = 1;
1383pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT8: JSTypedArrayEnum = 2;
1384pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT16: JSTypedArrayEnum = 3;
1385pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT16: JSTypedArrayEnum = 4;
1386pub const JSTypedArrayEnum_JS_TYPED_ARRAY_INT32: JSTypedArrayEnum = 5;
1387pub const JSTypedArrayEnum_JS_TYPED_ARRAY_UINT32: JSTypedArrayEnum = 6;
1388pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_INT64: JSTypedArrayEnum = 7;
1389pub const JSTypedArrayEnum_JS_TYPED_ARRAY_BIG_UINT64: JSTypedArrayEnum = 8;
1390pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT16: JSTypedArrayEnum = 9;
1391pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT32: JSTypedArrayEnum = 10;
1392pub const JSTypedArrayEnum_JS_TYPED_ARRAY_FLOAT64: JSTypedArrayEnum = 11;
1393pub type JSTypedArrayEnum = ::core::ffi::c_uint;
1394unsafe extern "C" {
1395 pub fn JS_NewTypedArray(
1396 ctx: *mut JSContext,
1397 argc: ::core::ffi::c_int,
1398 argv: *mut JSValue,
1399 array_type: JSTypedArrayEnum,
1400 ) -> JSValue;
1401}
1402unsafe extern "C" {
1403 pub fn JS_GetTypedArrayBuffer(
1404 ctx: *mut JSContext,
1405 obj: JSValue,
1406 pbyte_offset: *mut size_t,
1407 pbyte_length: *mut size_t,
1408 pbytes_per_element: *mut size_t,
1409 ) -> JSValue;
1410}
1411unsafe extern "C" {
1412 pub fn JS_NewUint8Array(
1413 ctx: *mut JSContext,
1414 buf: *mut u8,
1415 len: size_t,
1416 realloc_func: JSReallocArrayBufferDataFunc,
1417 opaque: *mut ::core::ffi::c_void,
1418 is_shared: bool,
1419 ) -> JSValue;
1420}
1421unsafe extern "C" {
1422 pub fn JS_GetTypedArrayType(obj: JSValue) -> ::core::ffi::c_int;
1423}
1424unsafe extern "C" {
1425 pub fn JS_NewUint8ArrayCopy(ctx: *mut JSContext, buf: *const u8, len: size_t) -> JSValue;
1426}
1427#[repr(C)]
1428#[derive(Debug, Copy, Clone)]
1429pub struct JSSharedArrayBufferFunctions {
1430 pub sab_alloc: ::core::option::Option<
1431 unsafe extern "C" fn(
1432 opaque: *mut ::core::ffi::c_void,
1433 size: size_t,
1434 ) -> *mut ::core::ffi::c_void,
1435 >,
1436 pub sab_free: ::core::option::Option<
1437 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
1438 >,
1439 pub sab_dup: ::core::option::Option<
1440 unsafe extern "C" fn(opaque: *mut ::core::ffi::c_void, ptr: *mut ::core::ffi::c_void),
1441 >,
1442 pub sab_opaque: *mut ::core::ffi::c_void,
1443}
1444#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1445const _: () = {
1446 ["Size of JSSharedArrayBufferFunctions"]
1447 [::core::mem::size_of::<JSSharedArrayBufferFunctions>() - 32usize];
1448 ["Alignment of JSSharedArrayBufferFunctions"]
1449 [::core::mem::align_of::<JSSharedArrayBufferFunctions>() - 8usize];
1450 ["Offset of field: JSSharedArrayBufferFunctions::sab_alloc"]
1451 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_alloc) - 0usize];
1452 ["Offset of field: JSSharedArrayBufferFunctions::sab_free"]
1453 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_free) - 8usize];
1454 ["Offset of field: JSSharedArrayBufferFunctions::sab_dup"]
1455 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_dup) - 16usize];
1456 ["Offset of field: JSSharedArrayBufferFunctions::sab_opaque"]
1457 [::core::mem::offset_of!(JSSharedArrayBufferFunctions, sab_opaque) - 24usize];
1458};
1459unsafe extern "C" {
1460 pub fn JS_SetSharedArrayBufferFunctions(
1461 rt: *mut JSRuntime,
1462 sf: *const JSSharedArrayBufferFunctions,
1463 );
1464}
1465pub const JSPromiseStateEnum_JS_PROMISE_NOT_A_PROMISE: JSPromiseStateEnum = -1;
1466pub const JSPromiseStateEnum_JS_PROMISE_PENDING: JSPromiseStateEnum = 0;
1467pub const JSPromiseStateEnum_JS_PROMISE_FULFILLED: JSPromiseStateEnum = 1;
1468pub const JSPromiseStateEnum_JS_PROMISE_REJECTED: JSPromiseStateEnum = 2;
1469pub type JSPromiseStateEnum = ::core::ffi::c_int;
1470unsafe extern "C" {
1471 pub fn JS_NewPromiseCapability(ctx: *mut JSContext, resolving_funcs: *mut JSValue) -> JSValue;
1472}
1473unsafe extern "C" {
1474 pub fn JS_PromiseThen(
1475 ctx: *mut JSContext,
1476 promise: JSValue,
1477 on_fulfilled: JSValue,
1478 on_rejected: JSValue,
1479 ) -> JSValue;
1480}
1481unsafe extern "C" {
1482 pub fn JS_PromiseState(ctx: *mut JSContext, promise: JSValue) -> JSPromiseStateEnum;
1483}
1484unsafe extern "C" {
1485 pub fn JS_PromiseResult(ctx: *mut JSContext, promise: JSValue) -> JSValue;
1486}
1487unsafe extern "C" {
1488 pub fn JS_IsPromise(val: JSValue) -> bool;
1489}
1490unsafe extern "C" {
1491 pub fn JS_PromiseMarkAsHandled(ctx: *mut JSContext, promise: JSValue);
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;