bun_native_plugin/
sys.rs

1/* automatically generated by rust-bindgen 0.71.1 */
2
3pub const __WORDSIZE: u32 = 64;
4pub const __has_safe_buffers: u32 = 1;
5pub const __STDC_WANT_LIB_EXT1__: u32 = 1;
6pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1;
7pub const _DARWIN_FEATURE_ONLY_64_BIT_INODE: u32 = 1;
8pub const _DARWIN_FEATURE_ONLY_VERS_1050: u32 = 1;
9pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1;
10pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3;
11pub const __has_ptrcheck: u32 = 0;
12pub const USE_CLANG_TYPES: u32 = 0;
13pub const __PTHREAD_SIZE__: u32 = 8176;
14pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
15pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8;
16pub const __PTHREAD_MUTEX_SIZE__: u32 = 56;
17pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8;
18pub const __PTHREAD_COND_SIZE__: u32 = 40;
19pub const __PTHREAD_ONCE_SIZE__: u32 = 8;
20pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192;
21pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16;
22pub const INT8_MAX: u32 = 127;
23pub const INT16_MAX: u32 = 32767;
24pub const INT32_MAX: u32 = 2147483647;
25pub const INT64_MAX: u64 = 9223372036854775807;
26pub const INT8_MIN: i32 = -128;
27pub const INT16_MIN: i32 = -32768;
28pub const INT32_MIN: i32 = -2147483648;
29pub const INT64_MIN: i64 = -9223372036854775808;
30pub const UINT8_MAX: u32 = 255;
31pub const UINT16_MAX: u32 = 65535;
32pub const UINT32_MAX: u32 = 4294967295;
33pub const UINT64_MAX: i32 = -1;
34pub const INT_LEAST8_MIN: i32 = -128;
35pub const INT_LEAST16_MIN: i32 = -32768;
36pub const INT_LEAST32_MIN: i32 = -2147483648;
37pub const INT_LEAST64_MIN: i64 = -9223372036854775808;
38pub const INT_LEAST8_MAX: u32 = 127;
39pub const INT_LEAST16_MAX: u32 = 32767;
40pub const INT_LEAST32_MAX: u32 = 2147483647;
41pub const INT_LEAST64_MAX: u64 = 9223372036854775807;
42pub const UINT_LEAST8_MAX: u32 = 255;
43pub const UINT_LEAST16_MAX: u32 = 65535;
44pub const UINT_LEAST32_MAX: u32 = 4294967295;
45pub const UINT_LEAST64_MAX: i32 = -1;
46pub const INT_FAST8_MIN: i32 = -128;
47pub const INT_FAST16_MIN: i32 = -32768;
48pub const INT_FAST32_MIN: i32 = -2147483648;
49pub const INT_FAST64_MIN: i64 = -9223372036854775808;
50pub const INT_FAST8_MAX: u32 = 127;
51pub const INT_FAST16_MAX: u32 = 32767;
52pub const INT_FAST32_MAX: u32 = 2147483647;
53pub const INT_FAST64_MAX: u64 = 9223372036854775807;
54pub const UINT_FAST8_MAX: u32 = 255;
55pub const UINT_FAST16_MAX: u32 = 65535;
56pub const UINT_FAST32_MAX: u32 = 4294967295;
57pub const UINT_FAST64_MAX: i32 = -1;
58pub const INTPTR_MAX: u64 = 9223372036854775807;
59pub const INTPTR_MIN: i64 = -9223372036854775808;
60pub const UINTPTR_MAX: i32 = -1;
61pub const SIZE_MAX: i32 = -1;
62pub const RSIZE_MAX: i32 = -1;
63pub const WINT_MIN: i32 = -2147483648;
64pub const WINT_MAX: u32 = 2147483647;
65pub const SIG_ATOMIC_MIN: i32 = -2147483648;
66pub const SIG_ATOMIC_MAX: u32 = 2147483647;
67pub type wchar_t = ::std::os::raw::c_int;
68pub type max_align_t = f64;
69pub type int_least8_t = i8;
70pub type int_least16_t = i16;
71pub type int_least32_t = i32;
72pub type int_least64_t = i64;
73pub type uint_least8_t = u8;
74pub type uint_least16_t = u16;
75pub type uint_least32_t = u32;
76pub type uint_least64_t = u64;
77pub type int_fast8_t = i8;
78pub type int_fast16_t = i16;
79pub type int_fast32_t = i32;
80pub type int_fast64_t = i64;
81pub type uint_fast8_t = u8;
82pub type uint_fast16_t = u16;
83pub type uint_fast32_t = u32;
84pub type uint_fast64_t = u64;
85pub type __int8_t = ::std::os::raw::c_schar;
86pub type __uint8_t = ::std::os::raw::c_uchar;
87pub type __int16_t = ::std::os::raw::c_short;
88pub type __uint16_t = ::std::os::raw::c_ushort;
89pub type __int32_t = ::std::os::raw::c_int;
90pub type __uint32_t = ::std::os::raw::c_uint;
91pub type __int64_t = ::std::os::raw::c_longlong;
92pub type __uint64_t = ::std::os::raw::c_ulonglong;
93#[repr(C)]
94#[derive(Copy, Clone)]
95pub union __mbstate_t {
96    pub __mbstate8: [::std::os::raw::c_char; 128usize],
97    pub _mbstateL: ::std::os::raw::c_longlong,
98}
99pub type intmax_t = ::std::os::raw::c_long;
100pub type uintmax_t = ::std::os::raw::c_ulong;
101#[repr(u32)]
102#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
103pub enum BunLoader {
104    BUN_LOADER_JSX = 0,
105    BUN_LOADER_JS = 1,
106    BUN_LOADER_TS = 2,
107    BUN_LOADER_TSX = 3,
108    BUN_LOADER_CSS = 4,
109    BUN_LOADER_FILE = 5,
110    BUN_LOADER_JSON = 6,
111    BUN_LOADER_TOML = 7,
112    BUN_LOADER_WASM = 8,
113    BUN_LOADER_NAPI = 9,
114    BUN_LOADER_BASE64 = 10,
115    BUN_LOADER_DATAURL = 11,
116    BUN_LOADER_TEXT = 12,
117}
118extern "C" {
119    pub static BUN_LOADER_MAX: BunLoader;
120}
121#[repr(C)]
122#[derive(Debug, Copy, Clone)]
123pub struct BunLogOptions {
124    pub __struct_size: usize,
125    pub message_ptr: *const u8,
126    pub message_len: usize,
127    pub path_ptr: *const u8,
128    pub path_len: usize,
129    pub source_line_text_ptr: *const u8,
130    pub source_line_text_len: usize,
131    pub level: i8,
132    pub line: ::std::os::raw::c_int,
133    pub lineEnd: ::std::os::raw::c_int,
134    pub column: ::std::os::raw::c_int,
135    pub columnEnd: ::std::os::raw::c_int,
136}
137#[repr(C)]
138#[derive(Debug, Copy, Clone)]
139pub struct OnBeforeParseArguments {
140    pub __struct_size: usize,
141    pub bun: *mut ::std::os::raw::c_void,
142    pub path_ptr: *const u8,
143    pub path_len: usize,
144    pub namespace_ptr: *const u8,
145    pub namespace_len: usize,
146    pub default_loader: u8,
147    pub external: *mut ::std::os::raw::c_void,
148}
149#[repr(C)]
150#[derive(Debug, Copy, Clone)]
151pub struct OnBeforeParseResult {
152    pub __struct_size: usize,
153    pub source_ptr: *mut u8,
154    pub source_len: usize,
155    pub loader: u8,
156    pub fetchSourceCode: ::std::option::Option<
157        unsafe extern "C" fn(
158            args: *const OnBeforeParseArguments,
159            result: *mut OnBeforeParseResult,
160        ) -> ::std::os::raw::c_int,
161    >,
162    pub plugin_source_code_context: *mut ::std::os::raw::c_void,
163    pub free_plugin_source_code_context:
164        ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void)>,
165    pub log: ::std::option::Option<
166        unsafe extern "C" fn(args: *const OnBeforeParseArguments, options: *mut BunLogOptions),
167    >,
168}
169#[repr(u32)]
170#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
171pub enum BunLogLevel {
172    BUN_LOG_LEVEL_VERBOSE = 0,
173    BUN_LOG_LEVEL_DEBUG = 1,
174    BUN_LOG_LEVEL_INFO = 2,
175    BUN_LOG_LEVEL_WARN = 3,
176    BUN_LOG_LEVEL_ERROR = 4,
177}
178extern "C" {
179    pub static BUN_LOG_MAX: BunLogLevel;
180}
181pub type __builtin_va_list = *mut ::std::os::raw::c_char;