xlsynth_sys/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Declarations for the C API for the XLS dynamic shared object.
4
5extern crate libc;
6
7#[repr(C)]
8pub struct CIrValue {
9    _private: [u8; 0], // Ensures the struct cannot be instantiated
10}
11
12#[repr(C)]
13pub struct CIrBits {
14    _private: [u8; 0], // Ensures the struct cannot be instantiated
15}
16
17#[repr(C)]
18pub struct CBitsRope {
19    _private: [u8; 0], // Ensures the struct cannot be instantiated
20}
21
22#[repr(C)]
23pub struct CIrPackage {
24    _private: [u8; 0], // Ensures the struct cannot be instantiated
25}
26
27#[repr(C)]
28pub struct CIrFunction {
29    _private: [u8; 0], // Ensures the struct cannot be instantiated
30}
31
32#[repr(C)]
33pub struct CIrFunctionBase {
34    _private: [u8; 0], // Ensures the struct cannot be instantiated
35}
36
37#[repr(C)]
38pub struct CIrFunctionJit {
39    _private: [u8; 0], // Ensures the struct cannot be instantiated
40}
41
42#[repr(C)]
43pub struct CTraceMessage {
44    pub message: *mut std::os::raw::c_char,
45    pub verbosity: i64,
46}
47
48#[repr(C)]
49pub struct CIrType {
50    _private: [u8; 0], // Ensures the struct cannot be instantiated
51}
52
53#[repr(C)]
54pub struct CIrFunctionType {
55    _private: [u8; 0], // Ensures the struct cannot be instantiated
56}
57
58// "VAST" is the "Verilog AST" API which
59#[repr(C)]
60pub struct CVastFile {
61    _private: [u8; 0], // Ensures the struct cannot be instantiated
62}
63
64#[repr(C)]
65pub struct CVastModule {
66    _private: [u8; 0], // Ensures the struct cannot be instantiated
67}
68
69#[repr(C)]
70pub struct CVastDataType {
71    _private: [u8; 0], // Ensures the struct cannot be instantiated
72}
73
74#[repr(C)]
75pub struct CVastExpression {
76    _private: [u8; 0], // Ensures the struct cannot be instantiated
77}
78
79#[repr(C)]
80pub struct CVastLiteral {
81    _private: [u8; 0], // Ensures the struct cannot be instantiated
82}
83
84#[repr(C)]
85pub struct CVastConcat {
86    _private: [u8; 0], // Ensures the struct cannot be instantiated
87}
88
89#[repr(C)]
90pub struct CVastComment {
91    _private: [u8; 0], // Ensures the struct cannot be instantiated
92}
93
94#[repr(C)]
95pub struct CVastBlankLine {
96    _private: [u8; 0], // Ensures the struct cannot be instantiated
97}
98
99#[repr(C)]
100pub struct CVastInlineVerilogStatement {
101    _private: [u8; 0], // Ensures the struct cannot be instantiated
102}
103
104#[repr(C)]
105pub struct CVastLogicRef {
106    _private: [u8; 0], // Ensures the struct cannot be instantiated
107}
108
109#[repr(C)]
110pub struct CVastInstantiation {
111    _private: [u8; 0], // Ensures the struct cannot be instantiated
112}
113
114#[repr(C)]
115pub struct CVastContinuousAssignment {
116    _private: [u8; 0], // Ensures the struct cannot be instantiated
117}
118
119#[repr(C)]
120pub struct CVastSlice {
121    _private: [u8; 0], // Ensures the struct cannot be instantiated
122}
123
124#[repr(C)]
125pub struct CVastIndex {
126    _private: [u8; 0], // Ensures the struct cannot be instantiated
127}
128
129#[repr(C)]
130pub struct CVastIndexableExpression {
131    _private: [u8; 0], // Ensures the struct cannot be instantiated
132}
133
134#[repr(C)]
135pub struct CVastAlwaysBase {
136    _private: [u8; 0], // Ensures the struct cannot be instantiated
137}
138
139#[repr(C)]
140pub struct CVastStatementBlock {
141    _private: [u8; 0], // Ensures the struct cannot be instantiated
142}
143
144#[repr(C)]
145pub struct CVastStatement {
146    _private: [u8; 0], // Ensures the struct cannot be instantiated
147}
148
149#[repr(C)]
150pub struct CVastConditional {
151    _private: [u8; 0], // Ensures the struct cannot be instantiated
152}
153
154#[repr(C)]
155pub struct CVastCaseStatement {
156    _private: [u8; 0], // Ensures the struct cannot be instantiated
157}
158
159#[repr(C)]
160pub struct CVastParameterRef {
161    _private: [u8; 0], // Ensures the struct cannot be instantiated
162}
163
164#[repr(C)]
165pub struct CVastLocalparamRef {
166    _private: [u8; 0], // Ensures the struct cannot be instantiated
167}
168
169#[repr(C)]
170pub struct CVastGenerateLoop {
171    _private: [u8; 0], // Ensures the struct cannot be instantiated
172}
173
174// -- DSLX
175
176#[repr(C)]
177pub struct CDslxImportData {
178    _private: [u8; 0], // Ensures the struct cannot be instantiated
179}
180
181#[repr(C)]
182pub struct CDslxTypecheckedModule {
183    _private: [u8; 0], // Ensures the struct cannot be instantiated
184}
185
186#[repr(C)]
187pub struct CDslxModule {
188    _private: [u8; 0], // Ensures the struct cannot be instantiated
189}
190
191#[repr(C)]
192pub struct CDslxTypeInfo {
193    _private: [u8; 0], // Ensures the struct cannot be instantiated
194}
195
196#[repr(C)]
197pub struct CDslxStructDef {
198    _private: [u8; 0], // Ensures the struct cannot be instantiated
199}
200
201#[repr(C)]
202pub struct CDslxEnumDef {
203    _private: [u8; 0], // Ensures the struct cannot be instantiated
204}
205
206#[repr(C)]
207pub struct CDslxTypeAlias {
208    _private: [u8; 0], // Ensures the struct cannot be instantiated
209}
210
211#[repr(C)]
212pub struct CDslxType {
213    _private: [u8; 0], // Ensures the struct cannot be instantiated
214}
215
216#[repr(C)]
217pub struct CDslxTypeDim {
218    _private: [u8; 0], // Ensures the struct cannot be instantiated
219}
220
221#[repr(C)]
222pub struct CDslxExpr {
223    _private: [u8; 0], // Ensures the struct cannot be instantiated
224}
225
226#[repr(C)]
227pub struct CDslxInterpValue {
228    _private: [u8; 0], // Ensures the struct cannot be instantiated
229}
230
231#[repr(C)]
232pub struct CDslxParametricEnv {
233    _private: [u8; 0], // Ensures the struct cannot be instantiated
234}
235
236#[repr(C)]
237pub struct CDslxEnumMember {
238    _private: [u8; 0], // Ensures the struct cannot be instantiated
239}
240
241#[repr(C)]
242pub struct CDslxStructMember {
243    _private: [u8; 0], // Ensures the struct cannot be instantiated
244}
245
246#[repr(C)]
247pub struct CDslxTypeAnnotation {
248    _private: [u8; 0], // Ensures the struct cannot be instantiated
249}
250
251#[repr(C)]
252pub struct CDslxTypeRefTypeAnnotation {
253    _private: [u8; 0], // Ensures the struct cannot be instantiated
254}
255
256#[repr(C)]
257pub struct CDslxTypeRef {
258    _private: [u8; 0], // Ensures the struct cannot be instantiated
259}
260
261#[repr(C)]
262pub struct CDslxImport {
263    _private: [u8; 0], // Ensures the struct cannot be instantiated
264}
265
266#[repr(C)]
267pub struct CDslxColonRef {
268    _private: [u8; 0], // Ensures the struct cannot be instantiated
269}
270
271#[repr(C)]
272pub struct CDslxTypeDefinition {
273    _private: [u8; 0], // Ensures the struct cannot be instantiated
274}
275
276#[repr(C)]
277pub struct CDslxConstantDef {
278    _private: [u8; 0], // Ensures the struct cannot be instantiated
279}
280
281#[repr(C)]
282pub struct CDslxModuleMember {
283    _private: [u8; 0], // Ensures the struct cannot be instantiated
284}
285
286#[repr(C)]
287pub struct CDslxFunction {
288    _private: [u8; 0], // Ensures the struct cannot be instantiated
289}
290
291#[repr(C)]
292pub struct CDslxParam {
293    _private: [u8; 0], // Ensures the struct cannot be instantiated
294}
295
296#[repr(C)]
297pub struct CDslxCallGraph {
298    _private: [u8; 0], // Ensures the struct cannot be instantiated
299}
300
301#[repr(C)]
302pub struct CDslxQuickcheck {
303    _private: [u8; 0], // Ensures the struct cannot be instantiated
304}
305
306#[repr(C)]
307pub struct CDslxInvocationCalleeDataArray {
308    _private: [u8; 0],
309}
310
311#[repr(C)]
312pub struct CDslxInvocationCalleeData {
313    _private: [u8; 0],
314}
315
316#[repr(C)]
317pub struct CDslxInvocationData {
318    _private: [u8; 0],
319}
320
321#[repr(C)]
322pub struct CDslxInvocation {
323    _private: [u8; 0],
324}
325
326#[repr(C)]
327pub struct CScheduleAndCodegenResult {
328    _private: [u8; 0], // Ensures the struct cannot be instantiated
329}
330
331#[repr(C)]
332pub struct CIrBuilderBase {
333    _private: [u8; 0], // Ensures the struct cannot be instantiated
334}
335
336#[repr(C)]
337pub struct CIrBValue {
338    _private: [u8; 0], // Ensures the struct cannot be instantiated
339}
340
341#[repr(C)]
342pub struct CIrFunctionBuilder {
343    _private: [u8; 0], // Ensures the struct cannot be instantiated
344}
345
346pub type XlsFormatPreference = i32;
347pub type XlsValueKind = i32;
348
349// Calling convention used for DSLX mangling APIs.
350pub type XlsCallingConvention = i32;
351
352pub type CVastFileType = i32;
353
354pub type VastOperatorKind = i32;
355
356// Data kind for VAST Defs.
357pub type VastDataKind = i32;
358pub const XLS_VAST_DATA_KIND_REG: VastDataKind = 0;
359pub const XLS_VAST_DATA_KIND_WIRE: VastDataKind = 1;
360pub const XLS_VAST_DATA_KIND_LOGIC: VastDataKind = 2;
361pub const XLS_VAST_DATA_KIND_INTEGER: VastDataKind = 3;
362pub const XLS_VAST_DATA_KIND_INT: VastDataKind = 4;
363pub const XLS_VAST_DATA_KIND_USER: VastDataKind = 5;
364pub const XLS_VAST_DATA_KIND_UNTYPED_ENUM: VastDataKind = 6;
365pub const XLS_VAST_DATA_KIND_GENVAR: VastDataKind = 7;
366
367pub type DslxTypeDefinitionKind = i32;
368
369pub type DslxModuleMemberKind = i32;
370
371pub const XLS_CALLING_CONVENTION_TYPICAL: XlsCallingConvention = 0;
372pub const XLS_CALLING_CONVENTION_IMPLICIT_TOKEN: XlsCallingConvention = 1;
373pub const XLS_CALLING_CONVENTION_PROC_NEXT: XlsCallingConvention = 2;
374
375#[repr(C)]
376pub struct XlsDslxParametricEnvItem {
377    pub identifier: *const std::os::raw::c_char,
378    pub value: *const CDslxInterpValue,
379}
380
381#[repr(C)]
382pub struct CDslxInvocationRewriteRule {
383    pub from_callee: *mut CDslxFunction,
384    pub to_callee: *mut CDslxFunction,
385    pub match_callee_env: *const CDslxParametricEnv,
386    pub to_callee_env: *const CDslxParametricEnv,
387}
388
389extern "C" {
390    pub fn xls_convert_dslx_to_ir(
391        dslx: *const std::os::raw::c_char,
392        path: *const std::os::raw::c_char,
393        module_name: *const std::os::raw::c_char,
394        dslx_stdlib_path: *const std::os::raw::c_char,
395        additional_search_paths: *const *const std::os::raw::c_char,
396        additional_search_paths_count: libc::size_t,
397        error_out: *mut *mut std::os::raw::c_char,
398        ir_out: *mut *mut std::os::raw::c_char,
399    ) -> bool;
400
401    pub fn xls_convert_dslx_to_ir_with_warnings(
402        dslx: *const std::os::raw::c_char,
403        path: *const std::os::raw::c_char,
404        module_name: *const std::os::raw::c_char,
405        dslx_stdlib_path: *const std::os::raw::c_char,
406        additional_search_paths: *const *const std::os::raw::c_char,
407        additional_search_paths_count: libc::size_t,
408        enable_warnings: *const *const std::os::raw::c_char,
409        enable_warnings_count: libc::size_t,
410        disable_warnings: *const *const std::os::raw::c_char,
411        disable_warnings_count: libc::size_t,
412        warnings_as_errors: bool,
413        force_implicit_token_calling_convention: bool,
414        warnings_out: *mut *mut *mut std::os::raw::c_char,
415        warnings_out_count: *mut libc::size_t,
416        error_out: *mut *mut std::os::raw::c_char,
417        ir_out: *mut *mut std::os::raw::c_char,
418    ) -> bool;
419
420    pub fn xls_convert_dslx_path_to_ir(
421        path: *const std::os::raw::c_char,
422        dslx_stdlib_path: *const std::os::raw::c_char,
423        additional_search_paths: *const *const std::os::raw::c_char,
424        additional_search_paths_count: libc::size_t,
425        error_out: *mut *mut std::os::raw::c_char,
426        ir_out: *mut *mut std::os::raw::c_char,
427    ) -> bool;
428
429    pub fn xls_convert_dslx_path_to_ir_with_warnings(
430        path: *const std::os::raw::c_char,
431        dslx_stdlib_path: *const std::os::raw::c_char,
432        additional_search_paths: *const *const std::os::raw::c_char,
433        additional_search_paths_count: libc::size_t,
434        enable_warnings: *const *const std::os::raw::c_char,
435        enable_warnings_count: libc::size_t,
436        disable_warnings: *const *const std::os::raw::c_char,
437        disable_warnings_count: libc::size_t,
438        warnings_as_errors: bool,
439        force_implicit_token_calling_convention: bool,
440        warnings_out: *mut *mut *mut std::os::raw::c_char,
441        warnings_out_count: *mut libc::size_t,
442        error_out: *mut *mut std::os::raw::c_char,
443        ir_out: *mut *mut std::os::raw::c_char,
444    ) -> bool;
445
446    pub fn xls_parse_typed_value(
447        text: *const std::os::raw::c_char,
448        error_out: *mut *mut std::os::raw::c_char,
449        value_out: *mut *mut CIrValue,
450    ) -> bool;
451    pub fn xls_value_free(value: *mut CIrValue);
452
453    pub fn xls_value_clone(value: *const CIrValue) -> *mut CIrValue;
454
455    // Extracts a bits value from a (boxed) value or gives an error.
456    pub fn xls_value_get_bits(
457        value: *const CIrValue,
458        error_out: *mut *mut std::os::raw::c_char,
459        bits_out: *mut *mut CIrBits,
460    ) -> bool;
461
462    // Turns a span of IR values into a tuple value.
463    pub fn xls_value_make_tuple(
464        value_count: libc::size_t,
465        values: *const *const CIrValue,
466    ) -> *mut CIrValue;
467
468    // Create a token value
469    pub fn xls_value_make_token() -> *mut CIrValue;
470
471    /// Returns an error:
472    /// * if the elements do not all have the same type, or
473    /// * if the array is empty (because then we cannot determine the element
474    ///   type)
475    pub fn xls_value_make_array(
476        element_count: libc::size_t,
477        elements: *const *const CIrValue,
478        error_out: *mut *mut std::os::raw::c_char,
479        result_out: *mut *mut CIrValue,
480    ) -> bool;
481
482    // Extracts an element from a tuple/array value or gives an error (e.g. if this
483    // value is not a tuple/array or the index is out of bounds).
484    pub fn xls_value_get_element(
485        tuple: *const CIrValue,
486        index: libc::size_t,
487        error_out: *mut *mut std::os::raw::c_char,
488        element_out: *mut *mut CIrValue,
489    ) -> bool;
490
491    pub fn xls_value_get_element_count(
492        value: *const CIrValue,
493        error_out: *mut *mut std::os::raw::c_char,
494        count_out: *mut i64,
495    ) -> bool;
496
497    // Creates a bits value (via an unsigned integer) that is boxed in an IrValue.
498    pub fn xls_value_make_ubits(
499        bit_count: i64,
500        value: u64,
501        error_out: *mut *mut std::os::raw::c_char,
502        result_out: *mut *mut CIrValue,
503    ) -> bool;
504
505    // Creates a bits value (via a signed integer) that is boxed in an IrValue.
506    pub fn xls_value_make_sbits(
507        bit_count: i64,
508        value: i64,
509        error_out: *mut *mut std::os::raw::c_char,
510        result_out: *mut *mut CIrValue,
511    ) -> bool;
512
513    // Boxes an IR bits object into an IR value.
514    pub fn xls_value_from_bits(bits: *const CIrBits) -> *mut CIrValue;
515
516    pub fn xls_bits_make_ubits(
517        bit_count: i64,
518        value: u64,
519        error_out: *mut *mut std::os::raw::c_char,
520        bits_out: *mut *mut CIrBits,
521    ) -> bool;
522
523    pub fn xls_bits_make_sbits(
524        bit_count: i64,
525        value: i64,
526        error_out: *mut *mut std::os::raw::c_char,
527        bits_out: *mut *mut CIrBits,
528    ) -> bool;
529
530    pub fn xls_bits_free(bits: *mut CIrBits);
531    pub fn xls_bits_get_bit_count(bits: *const CIrBits) -> i64;
532    pub fn xls_bits_get_bit(bits: *const CIrBits, index: i64) -> bool;
533    pub fn xls_bits_eq(bits: *const CIrBits, other: *const CIrBits) -> bool;
534    pub fn xls_bits_ne(a: *const CIrBits, b: *const CIrBits) -> bool;
535    pub fn xls_bits_ult(a: *const CIrBits, b: *const CIrBits) -> bool;
536    pub fn xls_bits_ule(a: *const CIrBits, b: *const CIrBits) -> bool;
537    pub fn xls_bits_ugt(a: *const CIrBits, b: *const CIrBits) -> bool;
538    pub fn xls_bits_uge(a: *const CIrBits, b: *const CIrBits) -> bool;
539    pub fn xls_bits_slt(a: *const CIrBits, b: *const CIrBits) -> bool;
540    pub fn xls_bits_sle(a: *const CIrBits, b: *const CIrBits) -> bool;
541    pub fn xls_bits_sgt(a: *const CIrBits, b: *const CIrBits) -> bool;
542    pub fn xls_bits_sge(a: *const CIrBits, b: *const CIrBits) -> bool;
543    pub fn xls_bits_to_debug_string(bits: *const CIrBits) -> *mut std::os::raw::c_char;
544    pub fn xls_bits_make_bits_from_bytes(
545        bit_count: libc::size_t,
546        bytes: *const u8,
547        byte_count: libc::size_t,
548        error_out: *mut *mut std::os::raw::c_char,
549        bits_out: *mut *mut CIrBits,
550    ) -> bool;
551    pub fn xls_mangle_dslx_name_full(
552        module_name: *const std::os::raw::c_char,
553        function_name: *const std::os::raw::c_char,
554        convention: XlsCallingConvention,
555        free_keys: *const *const std::os::raw::c_char,
556        free_keys_count: libc::size_t,
557        param_env: *const CDslxParametricEnv,
558        scope: *const std::os::raw::c_char,
559        error_out: *mut *mut std::os::raw::c_char,
560        mangled_out: *mut *mut std::os::raw::c_char,
561    ) -> bool;
562    pub fn xls_bits_add(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
563    pub fn xls_bits_sub(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
564    pub fn xls_bits_umul(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
565    pub fn xls_bits_smul(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
566    pub fn xls_bits_negate(bits: *const CIrBits) -> *mut CIrBits;
567    pub fn xls_bits_abs(bits: *const CIrBits) -> *mut CIrBits;
568    pub fn xls_bits_not(bits: *const CIrBits) -> *mut CIrBits;
569    pub fn xls_bits_and(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
570    pub fn xls_bits_or(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
571    pub fn xls_bits_xor(lhs: *const CIrBits, rhs: *const CIrBits) -> *mut CIrBits;
572
573    pub fn xls_bits_shift_left_logical(bits: *const CIrBits, shift_amount: i64) -> *mut CIrBits;
574    pub fn xls_bits_shift_right_logical(bits: *const CIrBits, shift_amount: i64) -> *mut CIrBits;
575    pub fn xls_bits_shift_right_arithmetic(bits: *const CIrBits, shift_amount: i64)
576        -> *mut CIrBits;
577
578    // struct xls_bits* xls_bits_width_slice(const struct xls_bits* bits, int64_t
579    // start, int64_t width);
580
581    pub fn xls_bits_width_slice(bits: *const CIrBits, start: i64, width: i64) -> *mut CIrBits;
582
583    pub fn xls_bits_to_bytes(
584        bits: *const CIrBits,
585        error_out: *mut *mut std::os::raw::c_char,
586        bytes_out: *mut *mut u8,
587        byte_count_out: *mut libc::size_t,
588    ) -> bool;
589    pub fn xls_bytes_free(bytes: *mut u8);
590    pub fn xls_bits_to_uint64(
591        bits: *const CIrBits,
592        error_out: *mut *mut std::os::raw::c_char,
593        value_out: *mut u64,
594    ) -> bool;
595    pub fn xls_bits_to_int64(
596        bits: *const CIrBits,
597        error_out: *mut *mut std::os::raw::c_char,
598        value_out: *mut i64,
599    ) -> bool;
600
601    pub fn xls_create_bits_rope(bit_count: i64) -> *mut CBitsRope;
602    pub fn xls_bits_rope_append_bits(bits_rope: *mut CBitsRope, bits: *const CIrBits);
603    pub fn xls_bits_rope_get_bits(bits_rope: *mut CBitsRope) -> *mut CIrBits;
604    pub fn xls_bits_rope_free(bits_rope: *mut CBitsRope);
605
606    pub fn xls_package_free(package: *mut CIrPackage);
607    pub fn xls_c_str_free(c_str: *mut std::os::raw::c_char);
608    pub fn xls_c_strs_free(c_strs: *mut *mut std::os::raw::c_char, count: libc::size_t);
609    pub fn xls_value_to_string(
610        value: *const CIrValue,
611        str_out: *mut *mut std::os::raw::c_char,
612    ) -> bool;
613    pub fn xls_format_preference_from_string(
614        s: *const std::os::raw::c_char,
615        error_out: *mut *mut std::os::raw::c_char,
616        result_out: *mut XlsFormatPreference,
617    ) -> bool;
618
619    pub fn xls_value_to_string_format_preference(
620        value: *const CIrValue,
621        fmt: XlsFormatPreference,
622        error_out: *mut *mut std::os::raw::c_char,
623        str_out: *mut *mut std::os::raw::c_char,
624    ) -> bool;
625    pub fn xls_bits_to_string(
626        bits: *const CIrBits,
627        fmt: XlsFormatPreference,
628        include_bit_count: bool,
629        error_out: *mut *mut std::os::raw::c_char,
630        str_out: *mut *mut std::os::raw::c_char,
631    ) -> bool;
632
633    pub fn xls_value_get_kind(
634        value: *const CIrValue,
635        error_out: *mut *mut std::os::raw::c_char,
636        kind_out: *mut XlsValueKind,
637    ) -> bool;
638    pub fn xls_value_make_true() -> *mut CIrValue;
639    pub fn xls_value_make_false() -> *mut CIrValue;
640    pub fn xls_value_from_bits_owned(bits: *mut CIrBits) -> *mut CIrValue;
641    pub fn xls_value_flatten_to_bits(value: *const CIrValue) -> *mut CIrBits;
642
643    pub fn xls_value_eq(value: *const CIrValue, value: *const CIrValue) -> bool;
644    pub fn xls_parse_ir_package(
645        ir: *const std::os::raw::c_char,
646        filename: *const std::os::raw::c_char,
647        error_out: *mut *mut std::os::raw::c_char,
648        xls_package_out: *mut *mut CIrPackage,
649    ) -> bool;
650    pub fn xls_type_to_string(
651        t: *const CIrType,
652        error_out: *mut *mut std::os::raw::c_char,
653        result_out: *mut *mut std::os::raw::c_char,
654    ) -> bool;
655    pub fn xls_type_get_kind(
656        t: *mut CIrType,
657        error_out: *mut *mut std::os::raw::c_char,
658        kind_out: *mut XlsValueKind,
659    ) -> bool;
660    pub fn xls_type_get_flat_bit_count(t: *const CIrType) -> i64;
661    pub fn xls_type_get_leaf_count(t: *mut CIrType) -> i64;
662    pub fn xls_package_get_type_for_value(
663        package: *const CIrPackage,
664        value: *const CIrValue,
665        error_out: *mut *mut std::os::raw::c_char,
666        result_out: *mut *mut CIrType,
667    ) -> bool;
668    pub fn xls_package_get_function(
669        package: *const CIrPackage,
670        function_name: *const std::os::raw::c_char,
671        error_out: *mut *mut std::os::raw::c_char,
672        result_out: *mut *mut CIrFunction,
673    ) -> bool;
674    pub fn xls_package_get_functions(
675        package: *mut CIrPackage,
676        error_out: *mut *mut std::os::raw::c_char,
677        result_out: *mut *mut *mut CIrFunction,
678        count_out: *mut libc::size_t,
679    ) -> bool;
680    pub fn xls_function_ptr_array_free(function_pointer_array: *mut *mut CIrFunction);
681    pub fn xls_function_get_type(
682        function: *const CIrFunction,
683        error_out: *mut *mut std::os::raw::c_char,
684        xls_fn_type_out: *mut *mut CIrFunctionType,
685    ) -> bool;
686    pub fn xls_function_type_to_string(
687        t: *const CIrFunctionType,
688        error_out: *mut *mut std::os::raw::c_char,
689        string_out: *mut *mut std::os::raw::c_char,
690    ) -> bool;
691    pub fn xls_function_get_name(
692        function: *const CIrFunction,
693        error_out: *mut *mut std::os::raw::c_char,
694        name_out: *mut *mut std::os::raw::c_char,
695    ) -> bool;
696    pub fn xls_function_to_z3_smtlib(
697        function: *mut CIrFunction,
698        error_out: *mut *mut std::os::raw::c_char,
699        string_out: *mut *mut std::os::raw::c_char,
700    ) -> bool;
701    pub fn xls_interpret_function(
702        function: *const CIrFunction,
703        argc: libc::size_t,
704        args: *const *const CIrValue,
705        error_out: *mut *mut std::os::raw::c_char,
706        result_out: *mut *mut CIrValue,
707    ) -> bool;
708    pub fn xls_optimize_ir(
709        ir: *const std::os::raw::c_char,
710        top: *const std::os::raw::c_char,
711        error_out: *mut *mut std::os::raw::c_char,
712        ir_out: *mut *mut std::os::raw::c_char,
713    ) -> bool;
714    pub fn xls_mangle_dslx_name(
715        module_name: *const std::os::raw::c_char,
716        function_name: *const std::os::raw::c_char,
717        error_out: *mut *mut std::os::raw::c_char,
718        mangled_out: *mut *mut std::os::raw::c_char,
719    ) -> bool;
720    pub fn xls_init_xls(
721        usage: *const std::os::raw::c_char,
722        argc: libc::c_int,
723        argv: *mut *mut std::os::raw::c_char,
724    );
725    pub fn xls_package_to_string(
726        p: *const CIrPackage,
727        string_out: *mut *mut std::os::raw::c_char,
728    ) -> bool;
729    pub fn xls_package_get_top(p: *mut CIrPackage) -> *mut CIrFunctionBase;
730    pub fn xls_package_set_top_by_name(
731        p: *mut CIrPackage,
732        name: *const std::os::raw::c_char,
733        error_out: *mut *mut std::os::raw::c_char,
734    ) -> bool;
735
736    pub fn xls_verify_package(
737        p: *mut CIrPackage,
738        error_out: *mut *mut std::os::raw::c_char,
739    ) -> bool;
740
741    pub fn xls_make_function_jit(
742        function: *const CIrFunction,
743        error_out: *mut *mut std::os::raw::c_char,
744        result_out: *mut *mut CIrFunctionJit,
745    ) -> bool;
746    pub fn xls_function_jit_free(jit: *mut CIrFunctionJit);
747    pub fn xls_function_jit_run(
748        jit: *const CIrFunctionJit,
749        argc: libc::size_t,
750        args: *const *const CIrValue,
751        error_out: *mut *mut std::os::raw::c_char,
752        trace_messages_out: *mut *mut CTraceMessage,
753        trace_messages_count_out: *mut libc::size_t,
754        assert_messages_out: *mut *mut *mut std::os::raw::c_char,
755        assert_messages_count_out: *mut libc::size_t,
756        result_out: *mut *mut CIrValue,
757    ) -> bool;
758    pub fn xls_trace_messages_free(trace_messages: *mut CTraceMessage, count: libc::size_t);
759
760    // -- VAST APIs
761
762    pub fn xls_vast_make_verilog_file(file_type: CVastFileType) -> *mut CVastFile;
763    pub fn xls_vast_verilog_file_free(f: *mut CVastFile);
764    pub fn xls_vast_verilog_file_add_module(
765        f: *mut CVastFile,
766        name: *const std::os::raw::c_char,
767    ) -> *mut CVastModule;
768
769    // - Node creation
770    pub fn xls_vast_verilog_file_make_scalar_type(f: *mut CVastFile) -> *mut CVastDataType;
771    pub fn xls_vast_verilog_file_make_bit_vector_type(
772        f: *mut CVastFile,
773        bit_count: i64,
774        is_signed: bool,
775    ) -> *mut CVastDataType;
776    pub fn xls_vast_verilog_file_make_bit_vector_type_expr(
777        f: *mut CVastFile,
778        width_expr: *mut CVastExpression,
779        is_signed: bool,
780    ) -> *mut CVastDataType;
781    pub fn xls_vast_verilog_file_make_integer_type(
782        f: *mut CVastFile,
783        is_signed: bool,
784    ) -> *mut CVastDataType;
785    pub fn xls_vast_verilog_file_make_int_type(
786        f: *mut CVastFile,
787        is_signed: bool,
788    ) -> *mut CVastDataType;
789    pub fn xls_vast_verilog_file_make_integer_def(
790        f: *mut CVastFile,
791        name: *const std::os::raw::c_char,
792        is_signed: bool,
793    ) -> *mut CVastDef;
794    pub fn xls_vast_verilog_file_make_int_def(
795        f: *mut CVastFile,
796        name: *const std::os::raw::c_char,
797        is_signed: bool,
798    ) -> *mut CVastDef;
799    pub fn xls_vast_verilog_file_make_extern_package_type(
800        f: *mut CVastFile,
801        package_name: *const std::os::raw::c_char,
802        type_name: *const std::os::raw::c_char,
803    ) -> *mut CVastDataType;
804    pub fn xls_vast_verilog_file_make_packed_array_type(
805        f: *mut CVastFile,
806        element_type: *mut CVastDataType,
807        dims: *const i64,
808        dim_count: libc::size_t,
809    ) -> *mut CVastDataType;
810
811    // -- Data type introspection
812    pub fn xls_vast_data_type_width_as_int64(
813        type_: *mut CVastDataType,
814        out_width: *mut i64,
815        error_out: *mut *mut std::os::raw::c_char,
816    ) -> bool;
817
818    pub fn xls_vast_data_type_flat_bit_count_as_int64(
819        type_: *mut CVastDataType,
820        out_flat_bit_count: *mut i64,
821        error_out: *mut *mut std::os::raw::c_char,
822    ) -> bool;
823
824    // Returns width expression; may return nullptr if none.
825    pub fn xls_vast_data_type_width(type_: *mut CVastDataType) -> *mut CVastExpression;
826
827    pub fn xls_vast_data_type_is_signed(type_: *mut CVastDataType) -> bool;
828
829    pub fn xls_vast_verilog_file_make_continuous_assignment(
830        f: *mut CVastFile,
831        lhs: *mut CVastExpression,
832        rhs: *mut CVastExpression,
833    ) -> *mut CVastContinuousAssignment;
834
835    pub fn xls_vast_verilog_file_make_concat(
836        f: *mut CVastFile,
837        expressions: *mut *mut CVastExpression,
838        expression_count: libc::size_t,
839    ) -> *mut CVastExpression;
840
841    pub fn xls_vast_verilog_file_make_replicated_concat(
842        f: *mut CVastFile,
843        replication: *mut CVastExpression,
844        elements: *mut *mut CVastExpression,
845        element_count: libc::size_t,
846    ) -> *mut CVastConcat;
847
848    pub fn xls_vast_verilog_file_make_replicated_concat_i64(
849        f: *mut CVastFile,
850        replication_count: i64,
851        elements: *mut *mut CVastExpression,
852        element_count: libc::size_t,
853    ) -> *mut CVastConcat;
854
855    pub fn xls_vast_verilog_file_make_slice_i64(
856        f: *mut CVastFile,
857        subject: *mut CVastIndexableExpression,
858        hi: i64,
859        lo: i64,
860    ) -> *mut CVastSlice;
861    pub fn xls_vast_verilog_file_make_slice(
862        f: *mut CVastFile,
863        subject: *mut CVastIndexableExpression,
864        hi: *mut CVastExpression,
865        lo: *mut CVastExpression,
866    ) -> *mut CVastSlice;
867
868    pub fn xls_vast_verilog_file_make_index(
869        f: *mut CVastFile,
870        subject: *mut CVastIndexableExpression,
871        index: *mut CVastExpression,
872    ) -> *mut CVastIndex;
873    pub fn xls_vast_verilog_file_make_index_i64(
874        f: *mut CVastFile,
875        subject: *mut CVastIndexableExpression,
876        index: i64,
877    ) -> *mut CVastIndex;
878
879    pub fn xls_vast_verilog_file_make_unary(
880        f: *mut CVastFile,
881        arg: *mut CVastExpression,
882        op: VastOperatorKind,
883    ) -> *mut CVastExpression;
884
885    pub fn xls_vast_verilog_file_make_binary(
886        f: *mut CVastFile,
887        lhs: *mut CVastExpression,
888        rhs: *mut CVastExpression,
889        op: VastOperatorKind,
890    ) -> *mut CVastExpression;
891
892    pub fn xls_vast_verilog_file_make_ternary(
893        f: *mut CVastFile,
894        cond: *mut CVastExpression,
895        then_expr: *mut CVastExpression,
896        else_expr: *mut CVastExpression,
897    ) -> *mut CVastExpression;
898
899    pub fn xls_vast_verilog_file_make_width_cast(
900        f: *mut CVastFile,
901        width: *mut CVastExpression,
902        value: *mut CVastExpression,
903    ) -> *mut CVastExpression;
904
905    // Cast a value to a specific type.
906    pub fn xls_vast_verilog_file_make_type_cast(
907        f: *mut CVastFile,
908        type_: *mut CVastDataType,
909        value: *mut CVastExpression,
910    ) -> *mut CVastExpression;
911
912    pub fn xls_vast_verilog_file_make_instantiation(
913        f: *mut CVastFile,
914        module_name: *const std::os::raw::c_char,
915        instance_name: *const std::os::raw::c_char,
916        parameter_port_names: *const *const std::os::raw::c_char,
917        parameter_expressions: *const *const CVastExpression,
918        parameter_count: libc::size_t,
919        connection_port_names: *const *const std::os::raw::c_char,
920        connection_expressions: *const *const CVastExpression,
921        connection_count: libc::size_t,
922    ) -> *mut CVastInstantiation;
923    pub fn xls_vast_verilog_file_make_comment(
924        f: *mut CVastFile,
925        text: *const std::os::raw::c_char,
926    ) -> *mut CVastComment;
927    pub fn xls_vast_verilog_file_make_blank_line(f: *mut CVastFile) -> *mut CVastBlankLine;
928    pub fn xls_vast_verilog_file_make_inline_verilog_statement(
929        f: *mut CVastFile,
930        text: *const std::os::raw::c_char,
931    ) -> *mut CVastInlineVerilogStatement;
932    pub fn xls_vast_verilog_file_make_literal(
933        f: *mut CVastFile,
934        bits: *const CIrBits,
935        format_preference: XlsFormatPreference,
936        emit_bit_count: bool,
937        error_out: *mut *mut std::os::raw::c_char,
938        literal_out: *mut *mut CVastLiteral,
939    ) -> bool;
940    pub fn xls_vast_verilog_file_make_plain_literal(
941        f: *mut CVastFile,
942        value: i32,
943    ) -> *mut CVastLiteral;
944
945    // - Module additions
946    pub fn xls_vast_verilog_module_add_parameter_port(
947        m: *mut CVastModule,
948        name: *const std::os::raw::c_char,
949        rhs: *mut CVastExpression,
950    ) -> *mut CVastLogicRef;
951    pub fn xls_vast_verilog_module_add_typed_parameter_port(
952        m: *mut CVastModule,
953        name: *const std::os::raw::c_char,
954        type_: *mut CVastDataType,
955        rhs: *mut CVastExpression,
956    ) -> *mut CVastLogicRef;
957    pub fn xls_vast_verilog_module_add_input(
958        m: *mut CVastModule,
959        name: *const std::os::raw::c_char,
960        type_: *mut CVastDataType,
961    ) -> *mut CVastLogicRef;
962    pub fn xls_vast_verilog_module_add_output(
963        m: *mut CVastModule,
964        name: *const std::os::raw::c_char,
965        type_: *mut CVastDataType,
966    ) -> *mut CVastLogicRef;
967    pub fn xls_vast_verilog_module_add_inout(
968        m: *mut CVastModule,
969        name: *const std::os::raw::c_char,
970        type_: *mut CVastDataType,
971    ) -> *mut CVastLogicRef;
972    pub fn xls_vast_verilog_module_add_logic_input(
973        m: *mut CVastModule,
974        name: *const std::os::raw::c_char,
975        type_: *mut CVastDataType,
976    ) -> *mut CVastLogicRef;
977    pub fn xls_vast_verilog_module_add_logic_output(
978        m: *mut CVastModule,
979        name: *const std::os::raw::c_char,
980        type_: *mut CVastDataType,
981    ) -> *mut CVastLogicRef;
982    pub fn xls_vast_verilog_module_add_wire(
983        m: *mut CVastModule,
984        name: *const std::os::raw::c_char,
985        type_: *mut CVastDataType,
986    ) -> *mut CVastLogicRef;
987    pub fn xls_vast_verilog_module_add_generate_loop(
988        m: *mut CVastModule,
989        genvar_name: *const std::os::raw::c_char,
990        init: *mut CVastExpression,
991        limit: *mut CVastExpression,
992        label: *const std::os::raw::c_char,
993    ) -> *mut CVastGenerateLoop;
994    pub fn xls_vast_verilog_module_add_member_instantiation(
995        m: *mut CVastModule,
996        inst: *mut CVastInstantiation,
997    );
998    pub fn xls_vast_verilog_module_add_member_continuous_assignment(
999        m: *mut CVastModule,
1000        ca: *mut CVastContinuousAssignment,
1001    );
1002    pub fn xls_vast_verilog_module_add_member_comment(
1003        m: *mut CVastModule,
1004        comment: *mut CVastComment,
1005    );
1006    pub fn xls_vast_verilog_module_add_member_blank_line(
1007        m: *mut CVastModule,
1008        blank: *mut CVastBlankLine,
1009    );
1010    pub fn xls_vast_verilog_module_add_member_inline_statement(
1011        m: *mut CVastModule,
1012        stmt: *mut CVastInlineVerilogStatement,
1013    );
1014
1015    pub fn xls_vast_verilog_module_add_parameter(
1016        m: *mut CVastModule,
1017        name: *const std::os::raw::c_char,
1018        rhs: *mut CVastExpression,
1019    ) -> *mut CVastParameterRef;
1020
1021    pub fn xls_vast_verilog_module_add_localparam(
1022        m: *mut CVastModule,
1023        name: *const std::os::raw::c_char,
1024        rhs: *mut CVastExpression,
1025    ) -> *mut CVastLocalparamRef;
1026
1027    pub fn xls_vast_verilog_file_make_def(
1028        f: *mut CVastFile,
1029        name: *const std::os::raw::c_char,
1030        kind: VastDataKind,
1031        type_: *mut CVastDataType,
1032    ) -> *mut CVastDef;
1033
1034    pub fn xls_vast_verilog_module_add_parameter_with_def(
1035        m: *mut CVastModule,
1036        def: *mut CVastDef,
1037        rhs: *mut CVastExpression,
1038    ) -> *mut CVastParameterRef;
1039
1040    pub fn xls_vast_verilog_module_add_localparam_with_def(
1041        m: *mut CVastModule,
1042        def: *mut CVastDef,
1043        rhs: *mut CVastExpression,
1044    ) -> *mut CVastLocalparamRef;
1045
1046    pub fn xls_vast_verilog_module_get_name(m: *mut CVastModule) -> *mut std::os::raw::c_char;
1047
1048    // - Expression conversions
1049    pub fn xls_vast_logic_ref_as_indexable_expression(
1050        v: *mut CVastLogicRef,
1051    ) -> *mut CVastIndexableExpression;
1052    pub fn xls_vast_index_as_indexable_expression(
1053        v: *mut CVastIndex,
1054    ) -> *mut CVastIndexableExpression;
1055
1056    pub fn xls_vast_literal_as_expression(v: *mut CVastLiteral) -> *mut CVastExpression;
1057    pub fn xls_vast_concat_as_expression(v: *mut CVastConcat) -> *mut CVastExpression;
1058    pub fn xls_vast_logic_ref_as_expression(v: *mut CVastLogicRef) -> *mut CVastExpression;
1059    pub fn xls_vast_slice_as_expression(v: *mut CVastSlice) -> *mut CVastExpression;
1060    pub fn xls_vast_index_as_expression(v: *mut CVastIndex) -> *mut CVastExpression;
1061    pub fn xls_vast_parameter_ref_as_expression(v: *mut CVastParameterRef) -> *mut CVastExpression;
1062    pub fn xls_vast_localparam_ref_as_expression(
1063        v: *mut CVastLocalparamRef,
1064    ) -> *mut CVastExpression;
1065    pub fn xls_vast_indexable_expression_as_expression(
1066        v: *mut CVastIndexableExpression,
1067    ) -> *mut CVastExpression;
1068    pub fn xls_vast_verilog_file_make_unsized_one_literal(
1069        f: *mut CVastFile,
1070    ) -> *mut CVastExpression;
1071    pub fn xls_vast_verilog_file_make_unsized_zero_literal(
1072        f: *mut CVastFile,
1073    ) -> *mut CVastExpression;
1074    pub fn xls_vast_verilog_file_make_unsized_x_literal(f: *mut CVastFile) -> *mut CVastExpression;
1075
1076    pub fn xls_vast_logic_ref_get_name(v: *mut CVastLogicRef) -> *mut std::os::raw::c_char;
1077
1078    pub fn xls_vast_verilog_file_add_include(f: *mut CVastFile, path: *const std::os::raw::c_char);
1079    pub fn xls_vast_verilog_file_emit(f: *const CVastFile) -> *mut std::os::raw::c_char;
1080
1081    // -- DSLX
1082
1083    pub fn xls_dslx_import_data_create(
1084        dslx_stdlib_path: *const std::os::raw::c_char,
1085        additional_search_paths: *const *const std::os::raw::c_char,
1086        additional_search_paths_count: libc::size_t,
1087    ) -> *mut CDslxImportData;
1088    pub fn xls_dslx_import_data_free(data: *mut CDslxImportData);
1089
1090    pub fn xls_dslx_parse_and_typecheck(
1091        text: *const std::os::raw::c_char,
1092        path: *const std::os::raw::c_char,
1093        module_name: *const std::os::raw::c_char,
1094        import_data: *const CDslxImportData,
1095        error_out: *mut *mut std::os::raw::c_char,
1096        typechecked_module_out: *mut *mut CDslxTypecheckedModule,
1097    ) -> bool;
1098
1099    pub fn xls_dslx_typechecked_module_clone_removing_functions(
1100        tm: *mut CDslxTypecheckedModule,
1101        functions: *mut *mut CDslxFunction,
1102        function_count: libc::size_t,
1103        install_subject: *const std::os::raw::c_char,
1104        import_data: *mut CDslxImportData,
1105        error_out: *mut *mut std::os::raw::c_char,
1106        result_out: *mut *mut CDslxTypecheckedModule,
1107    ) -> bool;
1108
1109    pub fn xls_dslx_replace_invocations_in_module(
1110        tm: *mut CDslxTypecheckedModule,
1111        callers: *const *mut CDslxFunction,
1112        callers_count: libc::size_t,
1113        rules: *const CDslxInvocationRewriteRule,
1114        rules_count: libc::size_t,
1115        import_data: *mut CDslxImportData,
1116        install_subject: *const std::os::raw::c_char,
1117        error_out: *mut *mut std::os::raw::c_char,
1118        result_out: *mut *mut CDslxTypecheckedModule,
1119    ) -> bool;
1120
1121    // bool xls_schedule_and_codegen_package(
1122    // struct xls_package* p, const char* scheduling_options_flags_proto,
1123    // const char* codegen_flags_proto, bool with_delay_model, char** error_out,
1124    // struct xls_schedule_and_codegen_result** result_out);
1125    pub fn xls_schedule_and_codegen_package(
1126        p: *mut CIrPackage,
1127        scheduling_options_flags_proto: *const std::os::raw::c_char,
1128        codegen_flags_proto: *const std::os::raw::c_char,
1129        with_delay_model: bool,
1130        error_out: *mut *mut std::os::raw::c_char,
1131        result_out: *mut *mut CScheduleAndCodegenResult,
1132    ) -> bool;
1133
1134    pub fn xls_schedule_and_codegen_result_get_verilog_text(
1135        result: *mut CScheduleAndCodegenResult,
1136    ) -> *mut std::os::raw::c_char;
1137
1138    pub fn xls_schedule_and_codegen_result_free(result: *mut CScheduleAndCodegenResult);
1139
1140    pub fn xls_dslx_typechecked_module_free(module: *mut CDslxTypecheckedModule);
1141
1142    pub fn xls_dslx_typechecked_module_get_module(
1143        module: *mut CDslxTypecheckedModule,
1144    ) -> *mut CDslxModule;
1145
1146    pub fn xls_dslx_typechecked_module_get_type_info(
1147        module: *mut CDslxTypecheckedModule,
1148    ) -> *mut CDslxTypeInfo;
1149
1150    pub fn xls_dslx_module_to_string(module: *mut CDslxModule) -> *mut std::os::raw::c_char;
1151
1152    pub fn xls_dslx_module_get_name(module: *const CDslxModule) -> *mut std::os::raw::c_char;
1153
1154    pub fn xls_dslx_module_get_type_definition_count(module: *const CDslxModule) -> i64;
1155
1156    pub fn xls_dslx_module_get_member_count(module: *const CDslxModule) -> i64;
1157
1158    pub fn xls_dslx_module_get_member(module: *const CDslxModule, i: i64)
1159        -> *mut CDslxModuleMember;
1160
1161    pub fn xls_dslx_module_get_type_definition_kind(
1162        module: *const CDslxModule,
1163        i: i64,
1164    ) -> DslxTypeDefinitionKind;
1165
1166    pub fn xls_dslx_module_get_type_definition_as_struct_def(
1167        module: *const CDslxModule,
1168        i: i64,
1169    ) -> *mut CDslxStructDef;
1170    pub fn xls_dslx_module_get_type_definition_as_enum_def(
1171        module: *const CDslxModule,
1172        i: i64,
1173    ) -> *mut CDslxEnumDef;
1174    pub fn xls_dslx_module_get_type_definition_as_type_alias(
1175        module: *const CDslxModule,
1176        i: i64,
1177    ) -> *mut CDslxTypeAlias;
1178
1179    // -- xls_dslx_module_member
1180    pub fn xls_dslx_module_member_get_kind(
1181        member: *const CDslxModuleMember,
1182    ) -> DslxModuleMemberKind;
1183    pub fn xls_dslx_module_member_get_constant_def(
1184        member: *const CDslxModuleMember,
1185    ) -> *mut CDslxConstantDef;
1186    pub fn xls_dslx_module_member_get_type_alias(
1187        member: *const CDslxModuleMember,
1188    ) -> *mut CDslxTypeAlias;
1189    pub fn xls_dslx_module_member_get_struct_def(
1190        member: *const CDslxModuleMember,
1191    ) -> *mut CDslxStructDef;
1192    pub fn xls_dslx_module_member_get_enum_def(
1193        member: *const CDslxModuleMember,
1194    ) -> *mut CDslxEnumDef;
1195
1196    pub fn xls_dslx_colon_ref_get_attr(
1197        colon_ref: *const CDslxColonRef,
1198    ) -> *mut std::os::raw::c_char;
1199
1200    pub fn xls_dslx_type_info_get_type_struct_def(
1201        type_info: *mut CDslxTypeInfo,
1202        node: *mut CDslxStructDef,
1203    ) -> *mut CDslxType;
1204    pub fn xls_dslx_type_info_get_type_enum_def(
1205        type_info: *mut CDslxTypeInfo,
1206        node: *mut CDslxEnumDef,
1207    ) -> *mut CDslxType;
1208    pub fn xls_dslx_type_info_get_type_struct_member(
1209        type_info: *mut CDslxTypeInfo,
1210        member: *mut CDslxStructMember,
1211    ) -> *mut CDslxType;
1212    pub fn xls_dslx_type_info_get_type_type_alias(
1213        type_info: *mut CDslxTypeInfo,
1214        node: *mut CDslxTypeAlias,
1215    ) -> *mut CDslxType;
1216    pub fn xls_dslx_type_info_get_type_constant_def(
1217        type_info: *mut CDslxTypeInfo,
1218        node: *mut CDslxConstantDef,
1219    ) -> *mut CDslxType;
1220
1221    /// Gets the concrete type for a TypeAnnotation AST node.
1222    pub fn xls_dslx_type_info_get_type_type_annotation(
1223        type_info: *mut CDslxTypeInfo,
1224        type_annotation: *mut CDslxTypeAnnotation,
1225    ) -> *mut CDslxType;
1226
1227    pub fn xls_dslx_type_info_get_imported_type_info(
1228        type_info: *mut CDslxTypeInfo,
1229        module: *mut CDslxModule,
1230    ) -> *mut CDslxTypeInfo;
1231
1232    pub fn xls_dslx_type_info_get_unique_invocation_callee_data(
1233        type_info: *mut CDslxTypeInfo,
1234        function: *mut CDslxFunction,
1235    ) -> *mut CDslxInvocationCalleeDataArray;
1236    pub fn xls_dslx_type_info_get_all_invocation_callee_data(
1237        type_info: *mut CDslxTypeInfo,
1238        function: *mut CDslxFunction,
1239    ) -> *mut CDslxInvocationCalleeDataArray;
1240    pub fn xls_dslx_type_info_get_root_invocation_data(
1241        type_info: *mut CDslxTypeInfo,
1242        invocation: *mut CDslxInvocation,
1243    ) -> *mut CDslxInvocationData;
1244
1245    // -- call_graph
1246    pub fn xls_dslx_type_info_build_function_call_graph(
1247        type_info: *mut CDslxTypeInfo,
1248        error_out: *mut *mut std::os::raw::c_char,
1249        result_out: *mut *mut CDslxCallGraph,
1250    ) -> bool;
1251
1252    pub fn xls_dslx_call_graph_free(call_graph: *mut CDslxCallGraph);
1253
1254    pub fn xls_dslx_call_graph_get_function_count(call_graph: *mut CDslxCallGraph) -> i64;
1255
1256    pub fn xls_dslx_call_graph_get_function(
1257        call_graph: *mut CDslxCallGraph,
1258        index: i64,
1259    ) -> *mut CDslxFunction;
1260
1261    pub fn xls_dslx_call_graph_get_callee_count(
1262        call_graph: *mut CDslxCallGraph,
1263        caller: *mut CDslxFunction,
1264    ) -> i64;
1265
1266    pub fn xls_dslx_call_graph_get_callee_function(
1267        call_graph: *mut CDslxCallGraph,
1268        caller: *mut CDslxFunction,
1269        callee_index: i64,
1270    ) -> *mut CDslxFunction;
1271
1272    pub fn xls_dslx_invocation_callee_data_array_free(array: *mut CDslxInvocationCalleeDataArray);
1273    pub fn xls_dslx_invocation_callee_data_array_get_count(
1274        array: *mut CDslxInvocationCalleeDataArray,
1275    ) -> i64;
1276    pub fn xls_dslx_invocation_callee_data_array_get(
1277        array: *mut CDslxInvocationCalleeDataArray,
1278        index: i64,
1279    ) -> *mut CDslxInvocationCalleeData;
1280
1281    pub fn xls_dslx_invocation_callee_data_clone(
1282        data: *mut CDslxInvocationCalleeData,
1283    ) -> *mut CDslxInvocationCalleeData;
1284    pub fn xls_dslx_invocation_callee_data_free(data: *mut CDslxInvocationCalleeData);
1285    pub fn xls_dslx_invocation_callee_data_get_callee_bindings(
1286        data: *mut CDslxInvocationCalleeData,
1287    ) -> *const CDslxParametricEnv;
1288    pub fn xls_dslx_invocation_callee_data_get_caller_bindings(
1289        data: *mut CDslxInvocationCalleeData,
1290    ) -> *const CDslxParametricEnv;
1291    pub fn xls_dslx_invocation_callee_data_get_derived_type_info(
1292        data: *mut CDslxInvocationCalleeData,
1293    ) -> *mut CDslxTypeInfo;
1294    pub fn xls_dslx_invocation_callee_data_get_invocation(
1295        data: *mut CDslxInvocationCalleeData,
1296    ) -> *mut CDslxInvocation;
1297
1298    pub fn xls_dslx_invocation_data_get_invocation(
1299        data: *mut CDslxInvocationData,
1300    ) -> *mut CDslxInvocation;
1301    pub fn xls_dslx_invocation_data_get_callee(
1302        data: *mut CDslxInvocationData,
1303    ) -> *mut CDslxFunction;
1304    pub fn xls_dslx_invocation_data_get_caller(
1305        data: *mut CDslxInvocationData,
1306    ) -> *mut CDslxFunction;
1307
1308    // -- ConstantDef
1309
1310    pub fn xls_dslx_constant_def_get_name(
1311        constant_def: *const CDslxConstantDef,
1312    ) -> *mut std::os::raw::c_char;
1313
1314    pub fn xls_dslx_constant_def_get_value(constant_def: *const CDslxConstantDef)
1315        -> *mut CDslxExpr;
1316
1317    // -- TypeAlias
1318
1319    pub fn xls_dslx_type_alias_get_identifier(
1320        type_alias: *const CDslxTypeAlias,
1321    ) -> *mut std::os::raw::c_char;
1322
1323    pub fn xls_dslx_type_alias_get_type_annotation(
1324        type_alias: *const CDslxTypeAlias,
1325    ) -> *mut CDslxTypeAnnotation;
1326
1327    // -- TypeAnnotation
1328
1329    pub fn xls_dslx_type_annotation_get_type_ref_type_annotation(
1330        type_annotation: *const CDslxTypeAnnotation,
1331    ) -> *mut CDslxTypeRefTypeAnnotation;
1332
1333    // -- TypeRef
1334
1335    pub fn xls_dslx_type_ref_get_type_definition(
1336        type_ref: *const CDslxTypeRef,
1337    ) -> *mut CDslxTypeDefinition;
1338
1339    // -- Import
1340
1341    pub fn xls_dslx_import_get_subject_count(import: *const CDslxImport) -> i64;
1342    pub fn xls_dslx_import_get_subject(
1343        import: *const CDslxImport,
1344        i: i64,
1345    ) -> *mut std::os::raw::c_char;
1346
1347    // -- ColonRef
1348
1349    pub fn xls_dslx_colon_ref_resolve_import_subject(
1350        colon_ref: *const CDslxColonRef,
1351    ) -> *mut CDslxImport;
1352
1353    // -- TypeDefinition
1354
1355    pub fn xls_dslx_type_definition_get_colon_ref(
1356        type_definition: *const CDslxTypeDefinition,
1357    ) -> *mut CDslxColonRef;
1358    pub fn xls_dslx_type_definition_get_type_alias(
1359        type_definition: *const CDslxTypeDefinition,
1360    ) -> *mut CDslxTypeAlias;
1361
1362    // -- TypeRefTypeAnnotation
1363
1364    pub fn xls_dslx_type_ref_type_annotation_get_type_ref(
1365        type_ref_type_annotation: *const CDslxTypeRefTypeAnnotation,
1366    ) -> *mut CDslxTypeRef;
1367
1368    // -- StructDef
1369
1370    pub fn xls_dslx_struct_def_get_identifier(
1371        struct_def: *const CDslxStructDef,
1372    ) -> *mut std::os::raw::c_char;
1373
1374    pub fn xls_dslx_struct_def_is_parametric(struct_def: *const CDslxStructDef) -> bool;
1375
1376    pub fn xls_dslx_struct_def_get_member_count(struct_def: *const CDslxStructDef) -> i64;
1377
1378    pub fn xls_dslx_struct_def_get_member(
1379        struct_def: *const CDslxStructDef,
1380        i: i64,
1381    ) -> *mut CDslxStructMember;
1382
1383    pub fn xls_dslx_struct_member_get_name(
1384        member: *const CDslxStructMember,
1385    ) -> *mut std::os::raw::c_char;
1386
1387    pub fn xls_dslx_struct_member_get_type(
1388        member: *const CDslxStructMember,
1389    ) -> *mut CDslxTypeAnnotation;
1390
1391    // -- EnumDef
1392
1393    pub fn xls_dslx_enum_def_get_identifier(
1394        enum_def: *const CDslxEnumDef,
1395    ) -> *mut std::os::raw::c_char;
1396
1397    pub fn xls_dslx_enum_def_get_member_count(enum_def: *const CDslxEnumDef) -> i64;
1398
1399    pub fn xls_dslx_enum_def_get_member(
1400        enum_def: *const CDslxEnumDef,
1401        i: i64,
1402    ) -> *mut CDslxEnumMember;
1403
1404    pub fn xls_dslx_enum_def_get_underlying(
1405        enum_def: *const CDslxEnumDef,
1406    ) -> *mut CDslxTypeAnnotation;
1407
1408    pub fn xls_dslx_enum_member_get_name(
1409        member: *const CDslxEnumMember,
1410    ) -> *mut std::os::raw::c_char;
1411
1412    pub fn xls_dslx_enum_member_get_value(member: *const CDslxEnumMember) -> *mut CDslxExpr;
1413
1414    pub fn xls_dslx_expr_get_owner_module(expr: *mut CDslxExpr) -> *mut CDslxModule;
1415
1416    // --
1417
1418    pub fn xls_dslx_interp_value_free(value: *mut CDslxInterpValue);
1419
1420    pub fn xls_dslx_interp_value_to_string(
1421        value: *mut CDslxInterpValue,
1422    ) -> *mut std::os::raw::c_char;
1423
1424    pub fn xls_dslx_interp_value_clone(value: *const CDslxInterpValue) -> *mut CDslxInterpValue;
1425
1426    // Parametric env construction and InterpValue helpers
1427    pub fn xls_dslx_parametric_env_create(
1428        items: *const XlsDslxParametricEnvItem,
1429        items_count: libc::size_t,
1430        error_out: *mut *mut std::os::raw::c_char,
1431        env_out: *mut *mut CDslxParametricEnv,
1432    ) -> bool;
1433    pub fn xls_dslx_parametric_env_free(env: *mut CDslxParametricEnv);
1434
1435    pub fn xls_dslx_parametric_env_clone(env: *const CDslxParametricEnv)
1436        -> *mut CDslxParametricEnv;
1437    pub fn xls_dslx_parametric_env_equals(
1438        lhs: *const CDslxParametricEnv,
1439        rhs: *const CDslxParametricEnv,
1440    ) -> bool;
1441    pub fn xls_dslx_parametric_env_less_than(
1442        lhs: *const CDslxParametricEnv,
1443        rhs: *const CDslxParametricEnv,
1444    ) -> bool;
1445    pub fn xls_dslx_parametric_env_hash(env: *const CDslxParametricEnv) -> u64;
1446    pub fn xls_dslx_parametric_env_to_string(
1447        env: *const CDslxParametricEnv,
1448    ) -> *mut std::os::raw::c_char;
1449    pub fn xls_dslx_parametric_env_get_binding_count(env: *const CDslxParametricEnv) -> i64;
1450    pub fn xls_dslx_parametric_env_get_binding_identifier(
1451        env: *const CDslxParametricEnv,
1452        index: i64,
1453    ) -> *const std::os::raw::c_char;
1454    pub fn xls_dslx_parametric_env_get_binding_value(
1455        env: *const CDslxParametricEnv,
1456        index: i64,
1457    ) -> *mut CDslxInterpValue;
1458
1459    pub fn xls_dslx_interp_value_make_ubits(bit_count: i64, value: u64) -> *mut CDslxInterpValue;
1460    pub fn xls_dslx_interp_value_make_sbits(bit_count: i64, value: i64) -> *mut CDslxInterpValue;
1461    pub fn xls_dslx_interp_value_make_enum(
1462        def: *mut CDslxEnumDef,
1463        is_signed: bool,
1464        bits: *const CIrBits,
1465        error_out: *mut *mut std::os::raw::c_char,
1466        result_out: *mut *mut CDslxInterpValue,
1467    ) -> bool;
1468    pub fn xls_dslx_interp_value_make_tuple(
1469        element_count: libc::size_t,
1470        elements: *mut *mut CDslxInterpValue,
1471        error_out: *mut *mut std::os::raw::c_char,
1472        result_out: *mut *mut CDslxInterpValue,
1473    ) -> bool;
1474    pub fn xls_dslx_interp_value_make_array(
1475        element_count: libc::size_t,
1476        elements: *mut *mut CDslxInterpValue,
1477        error_out: *mut *mut std::os::raw::c_char,
1478        result_out: *mut *mut CDslxInterpValue,
1479    ) -> bool;
1480
1481    pub fn xls_dslx_interp_value_from_string(
1482        text: *const std::os::raw::c_char,
1483        dslx_stdlib_path: *const std::os::raw::c_char,
1484        error_out: *mut *mut std::os::raw::c_char,
1485        result_out: *mut *mut CDslxInterpValue,
1486    ) -> bool;
1487
1488    pub fn xls_dslx_interp_value_convert_to_ir(
1489        value: *mut CDslxInterpValue,
1490        error_out: *mut *mut std::os::raw::c_char,
1491        result_out: *mut *mut CIrValue,
1492    ) -> bool;
1493
1494    pub fn xls_dslx_type_to_string(
1495        type_: *const CDslxType,
1496        error_out: *mut *mut std::os::raw::c_char,
1497        result_out: *mut *mut std::os::raw::c_char,
1498    ) -> bool;
1499
1500    // Stringification for DSLX AST nodes
1501    pub fn xls_dslx_function_to_string(function: *const CDslxFunction)
1502        -> *mut std::os::raw::c_char;
1503    pub fn xls_dslx_struct_def_to_string(
1504        struct_def: *const CDslxStructDef,
1505    ) -> *mut std::os::raw::c_char;
1506    pub fn xls_dslx_enum_def_to_string(enum_def: *const CDslxEnumDef) -> *mut std::os::raw::c_char;
1507    pub fn xls_dslx_type_alias_to_string(
1508        type_alias: *const CDslxTypeAlias,
1509    ) -> *mut std::os::raw::c_char;
1510    pub fn xls_dslx_constant_def_to_string(
1511        constant_def: *const CDslxConstantDef,
1512    ) -> *mut std::os::raw::c_char;
1513    pub fn xls_dslx_quickcheck_to_string(qc: *const CDslxQuickcheck) -> *mut std::os::raw::c_char;
1514
1515    pub fn xls_dslx_type_info_get_const_expr(
1516        type_info: *mut CDslxTypeInfo,
1517        expr: *mut CDslxExpr,
1518        error_out: *mut *mut std::os::raw::c_char,
1519        result_out: *mut *mut CDslxInterpValue,
1520    ) -> bool;
1521
1522    pub fn xls_dslx_type_get_total_bit_count(
1523        type_: *const CDslxType,
1524        error_out: *mut *mut std::os::raw::c_char,
1525        result_out: *mut i64,
1526    ) -> bool;
1527
1528    pub fn xls_dslx_type_is_signed_bits(
1529        type_: *const CDslxType,
1530        error_out: *mut *mut std::os::raw::c_char,
1531        result_out: *mut bool,
1532    ) -> bool;
1533
1534    pub fn xls_dslx_type_is_bits_like(
1535        type_: *const CDslxType,
1536        is_signed: *mut *mut CDslxTypeDim,
1537        size: *mut *mut CDslxTypeDim,
1538    ) -> bool;
1539
1540    pub fn xls_dslx_type_is_enum(type_: *const CDslxType) -> bool;
1541    pub fn xls_dslx_type_is_struct(type_: *const CDslxType) -> bool;
1542    pub fn xls_dslx_type_is_array(type_: *const CDslxType) -> bool;
1543
1544    pub fn xls_dslx_type_dim_is_parametric(dim: *const CDslxTypeDim) -> bool;
1545    pub fn xls_dslx_type_dim_get_as_bool(
1546        dim: *const CDslxTypeDim,
1547        error_out: *mut *mut std::os::raw::c_char,
1548        result_out: *mut bool,
1549    ) -> bool;
1550    pub fn xls_dslx_type_dim_get_as_int64(
1551        dim: *const CDslxTypeDim,
1552        error_out: *mut *mut std::os::raw::c_char,
1553        result_out: *mut i64,
1554    ) -> bool;
1555    pub fn xls_dslx_type_dim_free(dim: *mut CDslxTypeDim);
1556
1557    pub fn xls_dslx_type_get_enum_def(ty: *const CDslxType) -> *mut CDslxEnumDef;
1558
1559    pub fn xls_dslx_type_get_struct_def(ty: *const CDslxType) -> *mut CDslxStructDef;
1560
1561    pub fn xls_dslx_type_array_get_element_type(ty: *const CDslxType) -> *mut CDslxType;
1562    pub fn xls_dslx_type_array_get_size(ty: *const CDslxType) -> *mut CDslxTypeDim;
1563
1564    // -- IR builder APIs
1565
1566    pub fn xls_package_create(name: *const std::os::raw::c_char) -> *mut CIrPackage;
1567    pub fn xls_package_get_bits_type(package: *mut CIrPackage, bit_count: i64) -> *mut CIrType;
1568
1569    pub fn xls_package_get_tuple_type(
1570        package: *mut CIrPackage,
1571        members: *mut *mut CIrType,
1572        member_count: i64,
1573    ) -> *mut CIrType;
1574
1575    pub fn xls_package_get_array_type(
1576        package: *mut CIrPackage,
1577        element_type: *mut CIrType,
1578        size: i64,
1579    ) -> *mut CIrType;
1580
1581    pub fn xls_package_get_token_type(package: *mut CIrPackage) -> *mut CIrType;
1582
1583    pub fn xls_function_builder_create(
1584        name: *const std::os::raw::c_char,
1585        package: *mut CIrPackage,
1586        should_verify: bool,
1587    ) -> *mut CIrFunctionBuilder;
1588    pub fn xls_function_builder_as_builder_base(
1589        builder: *mut CIrFunctionBuilder,
1590    ) -> *mut CIrBuilderBase;
1591    pub fn xls_function_builder_free(builder: *mut CIrFunctionBuilder);
1592    pub fn xls_bvalue_free(bvalue: *mut CIrBValue);
1593    pub fn xls_function_builder_add_parameter(
1594        builder: *mut CIrFunctionBuilder,
1595        name: *const std::os::raw::c_char,
1596        type_: *mut CIrType,
1597    ) -> *mut CIrBValue;
1598    pub fn xls_function_builder_build(
1599        builder: *mut CIrFunctionBuilder,
1600        error_out: *mut *mut std::os::raw::c_char,
1601        function_out: *mut *mut CIrFunction,
1602    ) -> bool;
1603    pub fn xls_function_builder_build_with_return_value(
1604        builder: *mut CIrFunctionBuilder,
1605        return_value: *mut CIrBValue,
1606        error_out: *mut *mut std::os::raw::c_char,
1607        function_out: *mut *mut CIrFunction,
1608    ) -> bool;
1609    pub fn xls_builder_base_add_and(
1610        builder: *mut CIrBuilderBase,
1611        lhs: *mut CIrBValue,
1612        rhs: *mut CIrBValue,
1613        name: *const std::os::raw::c_char,
1614    ) -> *mut CIrBValue;
1615    pub fn xls_builder_base_add_nand(
1616        builder: *mut CIrBuilderBase,
1617        lhs: *mut CIrBValue,
1618        rhs: *mut CIrBValue,
1619        name: *const std::os::raw::c_char,
1620    ) -> *mut CIrBValue;
1621    pub fn xls_builder_base_add_or(
1622        builder: *mut CIrBuilderBase,
1623        lhs: *mut CIrBValue,
1624        rhs: *mut CIrBValue,
1625        name: *const std::os::raw::c_char,
1626    ) -> *mut CIrBValue;
1627    pub fn xls_builder_base_add_xor(
1628        builder: *mut CIrBuilderBase,
1629        lhs: *mut CIrBValue,
1630        rhs: *mut CIrBValue,
1631        name: *const std::os::raw::c_char,
1632    ) -> *mut CIrBValue;
1633    pub fn xls_builder_base_add_not(
1634        builder: *mut CIrBuilderBase,
1635        value: *mut CIrBValue,
1636        name: *const std::os::raw::c_char,
1637    ) -> *mut CIrBValue;
1638    pub fn xls_builder_base_add_negate(
1639        builder: *mut CIrBuilderBase,
1640        value: *mut CIrBValue,
1641        name: *const std::os::raw::c_char,
1642    ) -> *mut CIrBValue;
1643    pub fn xls_builder_base_add_reverse(
1644        builder: *mut CIrBuilderBase,
1645        value: *mut CIrBValue,
1646        name: *const std::os::raw::c_char,
1647    ) -> *mut CIrBValue;
1648    pub fn xls_builder_base_add_or_reduce(
1649        builder: *mut CIrBuilderBase,
1650        value: *mut CIrBValue,
1651        name: *const std::os::raw::c_char,
1652    ) -> *mut CIrBValue;
1653    pub fn xls_builder_base_add_and_reduce(
1654        builder: *mut CIrBuilderBase,
1655        value: *mut CIrBValue,
1656        name: *const std::os::raw::c_char,
1657    ) -> *mut CIrBValue;
1658    pub fn xls_builder_base_add_xor_reduce(
1659        builder: *mut CIrBuilderBase,
1660        value: *mut CIrBValue,
1661        name: *const std::os::raw::c_char,
1662    ) -> *mut CIrBValue;
1663    pub fn xls_builder_base_add_literal(
1664        builder: *mut CIrBuilderBase,
1665        value: *mut CIrValue,
1666        name: *const std::os::raw::c_char,
1667    ) -> *mut CIrBValue;
1668    pub fn xls_builder_base_add_tuple(
1669        builder: *mut CIrBuilderBase,
1670        operands: *mut *mut CIrBValue,
1671        operand_count: i64,
1672        name: *const std::os::raw::c_char,
1673    ) -> *mut CIrBValue;
1674    pub fn xls_builder_base_add_tuple_index(
1675        builder: *mut CIrBuilderBase,
1676        tuple: *mut CIrBValue,
1677        index: i64,
1678        name: *const std::os::raw::c_char,
1679    ) -> *mut CIrBValue;
1680    pub fn xls_builder_base_add_array(
1681        builder: *mut CIrBuilderBase,
1682        element_type: *mut CIrType,
1683        elements: *const *mut CIrBValue,
1684        element_count: i64,
1685        name: *const std::os::raw::c_char,
1686    ) -> *mut CIrBValue;
1687    pub fn xls_builder_base_add_array_index(
1688        builder: *mut CIrBuilderBase,
1689        array: *mut CIrBValue,
1690        indices: *const *mut CIrBValue,
1691        index_count: i64,
1692        assumed_in_bounds: bool,
1693        name: *const std::os::raw::c_char,
1694    ) -> *mut CIrBValue;
1695    pub fn xls_builder_base_add_dynamic_bit_slice(
1696        builder: *mut CIrBuilderBase,
1697        value: *mut CIrBValue,
1698        start: *mut CIrBValue,
1699        width: i64,
1700        name: *const std::os::raw::c_char,
1701    ) -> *mut CIrBValue;
1702    pub fn xls_builder_base_add_bit_slice(
1703        builder: *mut CIrBuilderBase,
1704        value: *mut CIrBValue,
1705        start: i64,
1706        width: i64,
1707        name: *const std::os::raw::c_char,
1708    ) -> *mut CIrBValue;
1709    pub fn xls_builder_base_add_bit_slice_update(
1710        builder: *mut CIrBuilderBase,
1711        value: *mut CIrBValue,
1712        start: *mut CIrBValue,
1713        update: *mut CIrBValue,
1714        name: *const std::os::raw::c_char,
1715    ) -> *mut CIrBValue;
1716    pub fn xls_builder_base_add_concat(
1717        builder: *mut CIrBuilderBase,
1718        values: *const *mut CIrBValue,
1719        value_count: i64,
1720        name: *const std::os::raw::c_char,
1721    ) -> *mut CIrBValue;
1722    pub fn xls_builder_base_add_after_all(
1723        builder: *mut CIrBuilderBase,
1724        dependencies: *mut *mut CIrBValue,
1725        dependency_count: i64,
1726        name: *const std::os::raw::c_char,
1727    ) -> *mut CIrBValue;
1728    pub fn xls_builder_base_add_add(
1729        builder: *mut CIrBuilderBase,
1730        lhs: *mut CIrBValue,
1731        rhs: *mut CIrBValue,
1732        name: *const std::os::raw::c_char,
1733    ) -> *mut CIrBValue;
1734    pub fn xls_builder_base_add_sub(
1735        builder: *mut CIrBuilderBase,
1736        lhs: *mut CIrBValue,
1737        rhs: *mut CIrBValue,
1738        name: *const std::os::raw::c_char,
1739    ) -> *mut CIrBValue;
1740    pub fn xls_builder_base_add_umul(
1741        builder: *mut CIrBuilderBase,
1742        lhs: *mut CIrBValue,
1743        rhs: *mut CIrBValue,
1744        name: *const std::os::raw::c_char,
1745    ) -> *mut CIrBValue;
1746    pub fn xls_builder_base_add_smul(
1747        builder: *mut CIrBuilderBase,
1748        lhs: *mut CIrBValue,
1749        rhs: *mut CIrBValue,
1750        name: *const std::os::raw::c_char,
1751    ) -> *mut CIrBValue;
1752    pub fn xls_builder_base_add_umulp(
1753        builder: *mut CIrBuilderBase,
1754        lhs: *mut CIrBValue,
1755        rhs: *mut CIrBValue,
1756        name: *const std::os::raw::c_char,
1757    ) -> *mut CIrBValue;
1758    pub fn xls_builder_base_add_smulp(
1759        builder: *mut CIrBuilderBase,
1760        lhs: *mut CIrBValue,
1761        rhs: *mut CIrBValue,
1762        name: *const std::os::raw::c_char,
1763    ) -> *mut CIrBValue;
1764    pub fn xls_builder_base_add_udiv(
1765        builder: *mut CIrBuilderBase,
1766        lhs: *mut CIrBValue,
1767        rhs: *mut CIrBValue,
1768        name: *const std::os::raw::c_char,
1769    ) -> *mut CIrBValue;
1770    pub fn xls_builder_base_add_sdiv(
1771        builder: *mut CIrBuilderBase,
1772        lhs: *mut CIrBValue,
1773        rhs: *mut CIrBValue,
1774        name: *const std::os::raw::c_char,
1775    ) -> *mut CIrBValue;
1776    pub fn xls_builder_base_add_umod(
1777        builder: *mut CIrBuilderBase,
1778        lhs: *mut CIrBValue,
1779        rhs: *mut CIrBValue,
1780        name: *const std::os::raw::c_char,
1781    ) -> *mut CIrBValue;
1782    pub fn xls_builder_base_add_smod(
1783        builder: *mut CIrBuilderBase,
1784        lhs: *mut CIrBValue,
1785        rhs: *mut CIrBValue,
1786        name: *const std::os::raw::c_char,
1787    ) -> *mut CIrBValue;
1788    pub fn xls_builder_base_add_eq(
1789        builder: *mut CIrBuilderBase,
1790        lhs: *mut CIrBValue,
1791        rhs: *mut CIrBValue,
1792        name: *const std::os::raw::c_char,
1793    ) -> *mut CIrBValue;
1794    pub fn xls_builder_base_add_ne(
1795        builder: *mut CIrBuilderBase,
1796        lhs: *mut CIrBValue,
1797        rhs: *mut CIrBValue,
1798        name: *const std::os::raw::c_char,
1799    ) -> *mut CIrBValue;
1800
1801    // -- comparisons
1802    pub fn xls_builder_base_add_ule(
1803        builder: *mut CIrBuilderBase,
1804        lhs: *mut CIrBValue,
1805        rhs: *mut CIrBValue,
1806        name: *const std::os::raw::c_char,
1807    ) -> *mut CIrBValue;
1808    pub fn xls_builder_base_add_ult(
1809        builder: *mut CIrBuilderBase,
1810        lhs: *mut CIrBValue,
1811        rhs: *mut CIrBValue,
1812        name: *const std::os::raw::c_char,
1813    ) -> *mut CIrBValue;
1814    pub fn xls_builder_base_add_uge(
1815        builder: *mut CIrBuilderBase,
1816        lhs: *mut CIrBValue,
1817        rhs: *mut CIrBValue,
1818        name: *const std::os::raw::c_char,
1819    ) -> *mut CIrBValue;
1820    pub fn xls_builder_base_add_ugt(
1821        builder: *mut CIrBuilderBase,
1822        lhs: *mut CIrBValue,
1823        rhs: *mut CIrBValue,
1824        name: *const std::os::raw::c_char,
1825    ) -> *mut CIrBValue;
1826    pub fn xls_builder_base_add_sle(
1827        builder: *mut CIrBuilderBase,
1828        lhs: *mut CIrBValue,
1829        rhs: *mut CIrBValue,
1830        name: *const std::os::raw::c_char,
1831    ) -> *mut CIrBValue;
1832    pub fn xls_builder_base_add_slt(
1833        builder: *mut CIrBuilderBase,
1834        lhs: *mut CIrBValue,
1835        rhs: *mut CIrBValue,
1836        name: *const std::os::raw::c_char,
1837    ) -> *mut CIrBValue;
1838    pub fn xls_builder_base_add_sgt(
1839        builder: *mut CIrBuilderBase,
1840        lhs: *mut CIrBValue,
1841        rhs: *mut CIrBValue,
1842        name: *const std::os::raw::c_char,
1843    ) -> *mut CIrBValue;
1844    pub fn xls_builder_base_add_sge(
1845        builder: *mut CIrBuilderBase,
1846        lhs: *mut CIrBValue,
1847        rhs: *mut CIrBValue,
1848        name: *const std::os::raw::c_char,
1849    ) -> *mut CIrBValue;
1850
1851    pub fn xls_builder_base_add_shra(
1852        builder: *mut CIrBuilderBase,
1853        a: *mut CIrBValue,
1854        b: *mut CIrBValue,
1855        name: *const std::os::raw::c_char,
1856    ) -> *mut CIrBValue;
1857    pub fn xls_builder_base_add_shrl(
1858        builder: *mut CIrBuilderBase,
1859        a: *mut CIrBValue,
1860        b: *mut CIrBValue,
1861        name: *const std::os::raw::c_char,
1862    ) -> *mut CIrBValue;
1863    pub fn xls_builder_base_add_shll(
1864        builder: *mut CIrBuilderBase,
1865        a: *mut CIrBValue,
1866        b: *mut CIrBValue,
1867        name: *const std::os::raw::c_char,
1868    ) -> *mut CIrBValue;
1869    pub fn xls_builder_base_add_nor(
1870        builder: *mut CIrBuilderBase,
1871        a: *mut CIrBValue,
1872        b: *mut CIrBValue,
1873        name: *const std::os::raw::c_char,
1874    ) -> *mut CIrBValue;
1875    pub fn xls_builder_base_add_clz(
1876        builder: *mut CIrBuilderBase,
1877        a: *mut CIrBValue,
1878        name: *const std::os::raw::c_char,
1879    ) -> *mut CIrBValue;
1880    pub fn xls_builder_base_add_ctz(
1881        builder: *mut CIrBuilderBase,
1882        a: *mut CIrBValue,
1883        name: *const std::os::raw::c_char,
1884    ) -> *mut CIrBValue;
1885    pub fn xls_builder_base_add_encode(
1886        builder: *mut CIrBuilderBase,
1887        a: *mut CIrBValue,
1888        name: *const std::os::raw::c_char,
1889    ) -> *mut CIrBValue;
1890
1891    pub fn xls_builder_base_add_decode(
1892        builder: *mut CIrBuilderBase,
1893        a: *mut CIrBValue,
1894        width: *mut i64,
1895        name: *const std::os::raw::c_char,
1896    ) -> *mut CIrBValue;
1897    pub fn xls_builder_base_add_select(
1898        builder: *mut CIrBuilderBase,
1899        selector: *mut CIrBValue,
1900        cases: *const *mut CIrBValue,
1901        case_count: i64,
1902        default_value: *mut CIrBValue,
1903        name: *const std::os::raw::c_char,
1904    ) -> *mut CIrBValue;
1905    pub fn xls_builder_base_add_array_concat(
1906        builder: *mut CIrBuilderBase,
1907        arrays: *const *mut CIrBValue,
1908        array_count: i64,
1909        name: *const std::os::raw::c_char,
1910    ) -> *mut CIrBValue;
1911    pub fn xls_builder_base_add_array_slice(
1912        builder: *mut CIrBuilderBase,
1913        array: *mut CIrBValue,
1914        start: *mut CIrBValue,
1915        width: i64,
1916        name: *const std::os::raw::c_char,
1917    ) -> *mut CIrBValue;
1918    pub fn xls_builder_base_add_array_update(
1919        builder: *mut CIrBuilderBase,
1920        array: *mut CIrBValue,
1921        update_value: *mut CIrBValue,
1922        indices: *const *mut CIrBValue,
1923        index_count: i64,
1924        assumed_in_bounds: bool,
1925        name: *const std::os::raw::c_char,
1926    ) -> *mut CIrBValue;
1927    pub fn xls_builder_base_add_identity(
1928        builder: *mut CIrBuilderBase,
1929        value: *mut CIrBValue,
1930        name: *const std::os::raw::c_char,
1931    ) -> *mut CIrBValue;
1932
1933    pub fn xls_builder_base_add_sign_extend(
1934        builder: *mut CIrBuilderBase,
1935        value: *mut CIrBValue,
1936        new_bit_count: i64,
1937        name: *const std::os::raw::c_char,
1938    ) -> *mut CIrBValue;
1939    pub fn xls_builder_base_add_zero_extend(
1940        builder: *mut CIrBuilderBase,
1941        value: *mut CIrBValue,
1942        new_bit_count: i64,
1943        name: *const std::os::raw::c_char,
1944    ) -> *mut CIrBValue;
1945
1946    pub fn xls_builder_base_add_one_hot(
1947        builder: *mut CIrBuilderBase,
1948        input: *mut CIrBValue,
1949        lsb_is_priority: bool,
1950        name: *const std::os::raw::c_char,
1951    ) -> *mut CIrBValue;
1952
1953    pub fn xls_builder_base_add_one_hot_select(
1954        builder: *mut CIrBuilderBase,
1955        selector: *mut CIrBValue,
1956        cases: *const *mut CIrBValue,
1957        case_count: i64,
1958        name: *const std::os::raw::c_char,
1959    ) -> *mut CIrBValue;
1960
1961    pub fn xls_builder_base_add_priority_select(
1962        builder: *mut CIrBuilderBase,
1963        selector: *mut CIrBValue,
1964        cases: *const *mut CIrBValue,
1965        case_count: i64,
1966        default_value: *mut CIrBValue,
1967        name: *const std::os::raw::c_char,
1968    ) -> *mut CIrBValue;
1969
1970    pub fn xls_builder_base_get_last_value(
1971        builder: *mut CIrBuilderBase,
1972        error_out: *mut *mut std::os::raw::c_char,
1973        value_out: *mut *mut CIrBValue,
1974    ) -> bool;
1975
1976    pub fn xls_builder_base_get_type(
1977        builder: *mut CIrBuilderBase,
1978        value: *mut CIrBValue,
1979    ) -> *mut CIrType;
1980
1981    // New functions for sequential logic
1982    pub fn xls_vast_verilog_module_add_always_ff(
1983        m: *mut CVastModule,
1984        sensitivity_list_elements: *mut *mut CVastExpression,
1985        sensitivity_list_count: usize,
1986        out_always_ff: *mut *mut CVastAlwaysBase,
1987        error_out: *mut *mut ::std::os::raw::c_char,
1988    ) -> bool;
1989    pub fn xls_vast_verilog_module_add_always_at(
1990        m: *mut CVastModule,
1991        sensitivity_list_elements: *mut *mut CVastExpression,
1992        sensitivity_list_count: usize,
1993        out_always_at: *mut *mut CVastAlwaysBase,
1994        error_out: *mut *mut ::std::os::raw::c_char,
1995    ) -> bool;
1996    pub fn xls_vast_verilog_module_add_always_comb(
1997        m: *mut CVastModule,
1998        out_always_comb: *mut *mut CVastAlwaysBase,
1999        error_out: *mut *mut ::std::os::raw::c_char,
2000    ) -> bool;
2001    pub fn xls_vast_verilog_module_add_reg(
2002        m: *mut CVastModule,
2003        name: *const ::std::os::raw::c_char,
2004        type_: *mut CVastDataType,
2005        out_reg_ref: *mut *mut CVastLogicRef,
2006        error_out: *mut *mut ::std::os::raw::c_char,
2007    ) -> bool;
2008    pub fn xls_vast_verilog_module_add_logic(
2009        m: *mut CVastModule,
2010        name: *const std::os::raw::c_char,
2011        type_: *mut CVastDataType,
2012        out_logic_ref: *mut *mut CVastLogicRef,
2013        error_out: *mut *mut std::os::raw::c_char,
2014    ) -> bool;
2015    pub fn xls_vast_verilog_file_make_pos_edge(
2016        f: *mut CVastFile,
2017        signal_expr: *mut CVastExpression,
2018    ) -> *mut CVastExpression;
2019    pub fn xls_vast_verilog_file_make_nonblocking_assignment(
2020        f: *mut CVastFile,
2021        lhs: *mut CVastExpression,
2022        rhs: *mut CVastExpression,
2023    ) -> *mut CVastStatement;
2024    pub fn xls_vast_verilog_file_make_blocking_assignment(
2025        f: *mut CVastFile,
2026        lhs: *mut CVastExpression,
2027        rhs: *mut CVastExpression,
2028    ) -> *mut CVastStatement;
2029
2030    pub fn xls_vast_always_base_get_statement_block(
2031        always_base: *mut CVastAlwaysBase,
2032    ) -> *mut CVastStatementBlock;
2033
2034    pub fn xls_vast_statement_block_add_nonblocking_assignment(
2035        block: *mut CVastStatementBlock,
2036        lhs: *mut CVastExpression,
2037        rhs: *mut CVastExpression,
2038    ) -> *mut CVastStatement;
2039    pub fn xls_vast_statement_block_add_blocking_assignment(
2040        block: *mut CVastStatementBlock,
2041        lhs: *mut CVastExpression,
2042        rhs: *mut CVastExpression,
2043    ) -> *mut CVastStatement;
2044
2045    pub fn xls_vast_statement_block_add_comment_text(
2046        block: *mut CVastStatementBlock,
2047        text: *const std::os::raw::c_char,
2048    ) -> *mut CVastStatement;
2049
2050    pub fn xls_vast_statement_block_add_blank_line(
2051        block: *mut CVastStatementBlock,
2052    ) -> *mut CVastStatement;
2053
2054    pub fn xls_vast_statement_block_add_inline_text(
2055        block: *mut CVastStatementBlock,
2056        text: *const std::os::raw::c_char,
2057    ) -> *mut CVastStatement;
2058    pub fn xls_vast_statement_block_add_generate_loop(
2059        block: *mut CVastStatementBlock,
2060        genvar_name: *const std::os::raw::c_char,
2061        init: *mut CVastExpression,
2062        limit: *mut CVastExpression,
2063        label: *const std::os::raw::c_char,
2064    ) -> *mut CVastGenerateLoop;
2065
2066    pub fn xls_vast_statement_block_add_continuous_assignment(
2067        block: *mut CVastStatementBlock,
2068        lhs: *mut CVastExpression,
2069        rhs: *mut CVastExpression,
2070    ) -> *mut CVastStatement;
2071
2072    // Conditional (if / else-if / else)
2073    pub fn xls_vast_statement_block_add_conditional(
2074        block: *mut CVastStatementBlock,
2075        cond: *mut CVastExpression,
2076    ) -> *mut CVastConditional;
2077    pub fn xls_vast_conditional_get_then_block(
2078        cond: *mut CVastConditional,
2079    ) -> *mut CVastStatementBlock;
2080    pub fn xls_vast_conditional_add_else_if(
2081        cond: *mut CVastConditional,
2082        expr_cond: *mut CVastExpression,
2083    ) -> *mut CVastStatementBlock;
2084    pub fn xls_vast_conditional_add_else(cond: *mut CVastConditional) -> *mut CVastStatementBlock;
2085
2086    // Case statement builders
2087    pub fn xls_vast_statement_block_add_case(
2088        block: *mut CVastStatementBlock,
2089        selector: *mut CVastExpression,
2090    ) -> *mut CVastCaseStatement;
2091    pub fn xls_vast_case_statement_add_item(
2092        case_stmt: *mut CVastCaseStatement,
2093        match_expr: *mut CVastExpression,
2094    ) -> *mut CVastStatementBlock;
2095    pub fn xls_vast_case_statement_add_default(
2096        case_stmt: *mut CVastCaseStatement,
2097    ) -> *mut CVastStatementBlock;
2098
2099    pub fn xls_vast_generate_loop_get_genvar(loop_: *mut CVastGenerateLoop) -> *mut CVastLogicRef;
2100
2101    pub fn xls_vast_generate_loop_add_statement(
2102        loop_: *mut CVastGenerateLoop,
2103        statement: *mut CVastStatement,
2104    );
2105    pub fn xls_vast_generate_loop_add_generate_loop(
2106        loop_: *mut CVastGenerateLoop,
2107        genvar_name: *const std::os::raw::c_char,
2108        init: *mut CVastExpression,
2109        limit: *mut CVastExpression,
2110        label: *const std::os::raw::c_char,
2111    ) -> *mut CVastGenerateLoop;
2112    pub fn xls_vast_generate_loop_add_always_comb(
2113        loop_: *mut CVastGenerateLoop,
2114        out_always_comb: *mut *mut CVastAlwaysBase,
2115        error_out: *mut *mut std::os::raw::c_char,
2116    ) -> bool;
2117    pub fn xls_vast_generate_loop_add_always_ff(
2118        loop_: *mut CVastGenerateLoop,
2119        sensitivity_list_elements: *mut *mut CVastExpression,
2120        sensitivity_list_count: usize,
2121        out_always_ff: *mut *mut CVastAlwaysBase,
2122        error_out: *mut *mut std::os::raw::c_char,
2123    ) -> bool;
2124    pub fn xls_vast_generate_loop_add_localparam(
2125        loop_: *mut CVastGenerateLoop,
2126        name: *const std::os::raw::c_char,
2127        rhs: *mut CVastExpression,
2128    ) -> *mut CVastLocalparamRef;
2129    pub fn xls_vast_generate_loop_add_localparam_with_def(
2130        loop_: *mut CVastGenerateLoop,
2131        def: *mut CVastDef,
2132        rhs: *mut CVastExpression,
2133    ) -> *mut CVastLocalparamRef;
2134    pub fn xls_vast_generate_loop_add_continuous_assignment(
2135        loop_: *mut CVastGenerateLoop,
2136        lhs: *mut CVastExpression,
2137        rhs: *mut CVastExpression,
2138    ) -> *mut CVastStatement;
2139
2140    pub fn xls_function_type_get_param_count(fty: *mut CIrFunctionType) -> i64;
2141
2142    pub fn xls_function_type_get_param_type(
2143        fty: *mut CIrFunctionType,
2144        index: libc::size_t,
2145        error_out: *mut *mut std::os::raw::c_char,
2146        param_type_out: *mut *mut CIrType,
2147    ) -> bool;
2148
2149    pub fn xls_function_type_get_return_type(fty: *mut CIrFunctionType) -> *mut CIrType;
2150
2151    pub fn xls_function_get_param_name(
2152        function: *mut CIrFunction,
2153        index: libc::size_t,
2154        error_out: *mut *mut std::os::raw::c_char,
2155        name_out: *mut *mut std::os::raw::c_char,
2156    ) -> bool;
2157
2158    pub fn xls_dslx_module_member_get_function(
2159        member: *const CDslxModuleMember,
2160    ) -> *mut CDslxFunction;
2161    pub fn xls_dslx_function_is_parametric(function: *const CDslxFunction) -> bool;
2162    pub fn xls_dslx_function_get_identifier(
2163        function: *const CDslxFunction,
2164    ) -> *mut std::os::raw::c_char;
2165
2166    pub fn xls_dslx_function_get_param_count(function: *const CDslxFunction) -> i64;
2167    pub fn xls_dslx_function_get_param(
2168        function: *const CDslxFunction,
2169        index: i64,
2170    ) -> *mut CDslxParam;
2171    pub fn xls_dslx_param_get_name(param: *const CDslxParam) -> *mut std::os::raw::c_char;
2172    pub fn xls_dslx_param_get_type_annotation(param: *const CDslxParam)
2173        -> *mut CDslxTypeAnnotation;
2174
2175    // -- "requires implicit token?" determination for a DSLX function
2176    pub fn xls_dslx_type_info_get_requires_implicit_token(
2177        type_info: *mut CDslxTypeInfo,
2178        function: *mut CDslxFunction,
2179        error_out: *mut *mut std::os::raw::c_char,
2180        result_out: *mut bool,
2181    ) -> bool;
2182
2183    // -- Quickcheck APIs
2184    pub fn xls_dslx_module_member_get_quickcheck(
2185        member: *const CDslxModuleMember,
2186    ) -> *mut CDslxQuickcheck;
2187
2188    pub fn xls_dslx_quickcheck_get_function(qc: *const CDslxQuickcheck) -> *mut CDslxFunction;
2189
2190    /// Returns true iff the Quickcheck has the `exhaustive` test-cases
2191    /// specifier.
2192    pub fn xls_dslx_quickcheck_is_exhaustive(qc: *const CDslxQuickcheck) -> bool;
2193
2194    /// Retrieves the test-case count for the Quickcheck. Returns true and sets
2195    /// `*result_out` when the Quickcheck has a counted test-case specifier;
2196    /// returns false when the Quickcheck is marked exhaustive (in which case
2197    /// `*result_out` is not modified).
2198    pub fn xls_dslx_quickcheck_get_count(qc: *const CDslxQuickcheck, result_out: *mut i64) -> bool;
2199}
2200
2201pub const DSLX_STDLIB_PATH: &str = env!("DSLX_STDLIB_PATH");
2202
2203/// Directory containing the libxls DSO.
2204///
2205/// *** DO NOT USE THIS VARIABLE FROM WITHIN YOUR build.rs ***
2206///
2207/// You might be tempted to write the following in your build.rs:
2208///
2209/// ```ignore
2210/// // DO NOT DO THIS IN YOUR build.rs!!
2211/// let dylib_dirpath = xlsynth_sys::XLS_DSO_PATH;
2212/// // set rpath to dylib_dirpath or something.
2213/// ```
2214///
2215/// The problem is that build.rs is compiled for host, whereas if you're setting
2216/// an rpath (or something similar) you want to get the path from compiling
2217/// xlsynth_sys for *target*.  In other words, the above will break
2218/// cross-compilation.
2219///
2220/// Instead, your build.rs should get the path from an envvar which:
2221///
2222/// ```ignore
2223/// // Do this from your build.rs instead.
2224/// let dylib_path = std::env::var("DEP_XLSYNTH_DSO_PATH").unwrap();
2225/// ```
2226///
2227/// More details are available at
2228/// <https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate>.
2229///
2230/// (If you use this envvar from your crate proper -- i.e. not from build.rs --
2231/// then it's perfectly fine.)
2232pub const XLS_DSO_PATH: &str = env!("XLS_DSO_PATH");
2233
2234// Add opaque types for module port and def.
2235#[repr(C)]
2236pub struct CVastModulePort {
2237    _private: [u8; 0], // Ensures the struct cannot be instantiated
2238}
2239
2240#[repr(C)]
2241pub struct CVastDef {
2242    _private: [u8; 0], // Ensures the struct cannot be instantiated
2243}
2244
2245// Direction enum for module ports.
2246pub type VastModulePortDirection = i32;
2247
2248// Constants that match the C enum definitions.
2249pub const XLS_VAST_MODULE_PORT_DIRECTION_INPUT: VastModulePortDirection = 0;
2250pub const XLS_VAST_MODULE_PORT_DIRECTION_OUTPUT: VastModulePortDirection = 1;
2251
2252extern "C" {
2253    // -- Module port inspection APIs
2254    pub fn xls_vast_verilog_module_get_ports(
2255        m: *mut CVastModule,
2256        out_count: *mut libc::size_t,
2257    ) -> *mut *mut CVastModulePort;
2258
2259    pub fn xls_vast_verilog_module_free_ports(
2260        ports: *mut *mut CVastModulePort,
2261        count: libc::size_t,
2262    );
2263
2264    pub fn xls_vast_verilog_module_port_get_direction(
2265        port: *mut CVastModulePort,
2266    ) -> VastModulePortDirection;
2267
2268    pub fn xls_vast_verilog_module_port_get_def(port: *mut CVastModulePort) -> *mut CVastDef;
2269
2270    pub fn xls_vast_def_get_name(def: *mut CVastDef) -> *mut std::os::raw::c_char;
2271
2272    pub fn xls_vast_def_get_data_type(def: *mut CVastDef) -> *mut CVastDataType;
2273}