lib/choir/src/backends/wasm/emission/model.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 const backends = @import("../../root.zig");
 2 
 3 pub const Options = backends.interface.EmitOptions;
 4 
 5 pub const Error = error{
 6     AlreadyActive,
 7     AlreadyEmitted,
 8     CapacityOverflow,
 9     CodeGenFailed,
10     FunctionNotFound,
11     InputChanged,
12     NestingLimitExceeded,
13     NotActive,
14     OutOfMemory,
15     OutputOverflow,
16     OutputUnderflow,
17     UnsupportedOperation,
18 };
19 
20 pub const max_nesting_depth: usize = 256;
21 
22 pub const Facts = struct {
23     function_count: usize,
24     import_count: usize,
25     definition_count: usize,
26     value_count: usize,
27     local_count: usize,
28     nesting_depth: usize,
29     needs_memory: bool,
30 };
31 
32 pub const SectionSizes = struct {
33     type: usize = 0,
34     import: usize = 0,
35     function: usize = 0,
36     memory: usize = 0,
37     export_: usize = 0,
38     code: usize = 0,
39 };