|
1 | | -/* global plonk_wasm, tsRustConversion, caml_string_of_jsstring, |
2 | | - free_on_finalize, caml_jsstring_of_string |
3 | | - */ |
4 | | - |
5 | | -/* |
6 | | -// Provides: caml_pasta_fq_plonk_circuit_serialize |
7 | | -// Requires: plonk_wasm, caml_string_of_jsstring |
8 | | -var caml_pasta_fq_plonk_circuit_serialize = function ( |
9 | | - public_input_size, |
10 | | - gate_vector |
11 | | -) { |
12 | | - return caml_string_of_jsstring( |
13 | | - plonk_wasm.caml_pasta_fq_plonk_circuit_serialize( |
14 | | - public_input_size, |
15 | | - gate_vector |
16 | | - ) |
17 | | - ); |
18 | | -}; |
19 | | -*/ |
20 | | - |
21 | | -// Provides: caml_pasta_fp_plonk_index_create |
22 | | -// Requires: plonk_wasm, free_on_finalize, tsRustConversion |
23 | | -var caml_pasta_fp_plonk_index_create = function ( |
24 | | - gates, |
25 | | - public_inputs, |
26 | | - caml_lookup_tables, |
27 | | - caml_runtime_table_cfgs, |
28 | | - prev_challenges, |
29 | | - urs, |
30 | | - lazy_mode |
31 | | -) { |
32 | | - var wasm_lookup_tables = |
33 | | - tsRustConversion.fp.lookupTablesToRust(caml_lookup_tables); |
34 | | - var wasm_runtime_table_cfgs = tsRustConversion.fp.runtimeTableCfgsToRust( |
35 | | - caml_runtime_table_cfgs |
36 | | - ); |
37 | | - |
38 | | - var t = plonk_wasm.caml_pasta_fp_plonk_index_create( |
39 | | - gates, |
40 | | - public_inputs, |
41 | | - wasm_lookup_tables, |
42 | | - wasm_runtime_table_cfgs, |
43 | | - prev_challenges, |
44 | | - urs, |
45 | | - lazy_mode |
46 | | - ); |
47 | | - return free_on_finalize(t); |
48 | | -}; |
49 | | - |
50 | | -// Provides: caml_pasta_fp_plonk_index_create_bytecode |
51 | | -// Requires: caml_pasta_fp_plonk_index_create |
52 | | -var caml_pasta_fp_plonk_index_create_bytecode = function ( |
53 | | - gates, |
54 | | - public_inputs, |
55 | | - caml_lookup_tables, |
56 | | - caml_runtime_table_cfgs, |
57 | | - prev_challenges, |
58 | | - urs, |
59 | | - lazy_mode |
60 | | -) { |
61 | | - return caml_pasta_fp_plonk_index_create( |
62 | | - gates, |
63 | | - public_inputs, |
64 | | - caml_lookup_tables, |
65 | | - caml_runtime_table_cfgs, |
66 | | - prev_challenges, |
67 | | - urs, |
68 | | - lazy_mode |
69 | | - ); |
70 | | -}; |
71 | | - |
72 | | -// Provides: caml_pasta_fp_plonk_index_max_degree |
73 | | -// Requires: plonk_wasm |
74 | | -var caml_pasta_fp_plonk_index_max_degree = |
75 | | - plonk_wasm.caml_pasta_fp_plonk_index_max_degree; |
76 | | - |
77 | | -// Provides: caml_pasta_fp_plonk_index_public_inputs |
78 | | -// Requires: plonk_wasm |
79 | | -var caml_pasta_fp_plonk_index_public_inputs = |
80 | | - plonk_wasm.caml_pasta_fp_plonk_index_public_inputs; |
81 | | - |
82 | | -// Provides: caml_pasta_fp_plonk_index_domain_d1_size |
83 | | -// Requires: plonk_wasm |
84 | | -var caml_pasta_fp_plonk_index_domain_d1_size = |
85 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d1_size; |
86 | | - |
87 | | -// Provides: caml_pasta_fp_plonk_index_domain_d4_size |
88 | | -// Requires: plonk_wasm |
89 | | -var caml_pasta_fp_plonk_index_domain_d4_size = |
90 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d4_size; |
91 | | - |
92 | | -// Provides: caml_pasta_fp_plonk_index_domain_d8_size |
93 | | -// Requires: plonk_wasm |
94 | | -var caml_pasta_fp_plonk_index_domain_d8_size = |
95 | | - plonk_wasm.caml_pasta_fp_plonk_index_domain_d8_size; |
96 | | - |
97 | | -// Provides: caml_pasta_fp_plonk_index_read |
98 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
99 | | -var caml_pasta_fp_plonk_index_read = function (offset, urs, path) { |
100 | | - if (offset === 0) { |
101 | | - offset = undefined; |
102 | | - } else { |
103 | | - offset = offset[1]; |
104 | | - } |
105 | | - return plonk_wasm.caml_pasta_fp_plonk_index_read( |
106 | | - offset, |
107 | | - urs, |
108 | | - caml_jsstring_of_string(path) |
109 | | - ); |
110 | | -}; |
111 | | - |
112 | | -// Provides: caml_pasta_fp_plonk_index_write |
113 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
114 | | -var caml_pasta_fp_plonk_index_write = function (append, t, path) { |
115 | | - if (append === 0) { |
116 | | - append = undefined; |
117 | | - } else { |
118 | | - append = append[1]; |
119 | | - } |
120 | | - return plonk_wasm.caml_pasta_fp_plonk_index_write( |
121 | | - append, |
122 | | - t, |
123 | | - caml_jsstring_of_string(path) |
124 | | - ); |
125 | | -}; |
126 | | - |
127 | | -// Provides: caml_pasta_fq_plonk_index_create |
128 | | -// Requires: plonk_wasm, free_on_finalize, tsRustConversion |
129 | | -var caml_pasta_fq_plonk_index_create = function ( |
130 | | - gates, |
131 | | - public_inputs, |
132 | | - caml_lookup_tables, |
133 | | - caml_runtime_table_cfgs, |
134 | | - prev_challenges, |
135 | | - urs, |
136 | | - lazy_mode |
137 | | -) { |
138 | | - var wasm_lookup_tables = |
139 | | - tsRustConversion.fq.lookupTablesToRust(caml_lookup_tables); |
140 | | - var wasm_runtime_table_cfgs = tsRustConversion.fq.runtimeTableCfgsToRust( |
141 | | - caml_runtime_table_cfgs |
142 | | - ); |
143 | | - |
144 | | - return free_on_finalize( |
145 | | - plonk_wasm.caml_pasta_fq_plonk_index_create( |
146 | | - gates, |
147 | | - public_inputs, |
148 | | - wasm_lookup_tables, |
149 | | - wasm_runtime_table_cfgs, |
150 | | - prev_challenges, |
151 | | - urs, |
152 | | - lazy_mode |
153 | | - ) |
154 | | - ); |
155 | | -}; |
156 | | - |
157 | | -// Provides: caml_pasta_fq_plonk_index_create_bytecode |
158 | | -// Requires: caml_pasta_fq_plonk_index_create |
159 | | -var caml_pasta_fq_plonk_index_create_bytecode = function ( |
160 | | - gates, |
161 | | - public_inputs, |
162 | | - caml_lookup_tables, |
163 | | - caml_runtime_table_cfgs, |
164 | | - prev_challenges, |
165 | | - urs, |
166 | | - lazy_mode |
167 | | -) { |
168 | | - return caml_pasta_fq_plonk_index_create( |
169 | | - gates, |
170 | | - public_inputs, |
171 | | - caml_lookup_tables, |
172 | | - caml_runtime_table_cfgs, |
173 | | - prev_challenges, |
174 | | - urs, |
175 | | - lazy_mode |
176 | | - ); |
177 | | -}; |
178 | | - |
179 | | -// Provides: caml_pasta_fq_plonk_index_max_degree |
180 | | -// Requires: plonk_wasm |
181 | | -var caml_pasta_fq_plonk_index_max_degree = |
182 | | - plonk_wasm.caml_pasta_fq_plonk_index_max_degree; |
183 | | - |
184 | | -// Provides: caml_pasta_fq_plonk_index_public_inputs |
185 | | -// Requires: plonk_wasm |
186 | | -var caml_pasta_fq_plonk_index_public_inputs = |
187 | | - plonk_wasm.caml_pasta_fq_plonk_index_public_inputs; |
188 | | - |
189 | | -// Provides: caml_pasta_fq_plonk_index_domain_d1_size |
190 | | -// Requires: plonk_wasm |
191 | | -var caml_pasta_fq_plonk_index_domain_d1_size = |
192 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d1_size; |
193 | | - |
194 | | -// Provides: caml_pasta_fq_plonk_index_domain_d4_size |
195 | | -// Requires: plonk_wasm |
196 | | -var caml_pasta_fq_plonk_index_domain_d4_size = |
197 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d4_size; |
198 | | - |
199 | | -// Provides: caml_pasta_fq_plonk_index_domain_d8_size |
200 | | -// Requires: plonk_wasm |
201 | | -var caml_pasta_fq_plonk_index_domain_d8_size = |
202 | | - plonk_wasm.caml_pasta_fq_plonk_index_domain_d8_size; |
203 | | - |
204 | | -// Provides: caml_pasta_fq_plonk_index_read |
205 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
206 | | -var caml_pasta_fq_plonk_index_read = function (offset, urs, path) { |
207 | | - if (offset === 0) { |
208 | | - offset = undefined; |
209 | | - } else { |
210 | | - offset = offset[1]; |
211 | | - } |
212 | | - return plonk_wasm.caml_pasta_fq_plonk_index_read( |
213 | | - offset, |
214 | | - urs, |
215 | | - caml_jsstring_of_string(path) |
216 | | - ); |
217 | | -}; |
218 | | - |
219 | | -// Provides: caml_pasta_fq_plonk_index_write |
220 | | -// Requires: plonk_wasm, caml_jsstring_of_string |
221 | | -var caml_pasta_fq_plonk_index_write = function (append, t, path) { |
222 | | - if (append === 0) { |
223 | | - append = undefined; |
224 | | - } else { |
225 | | - append = append[1]; |
226 | | - } |
227 | | - return plonk_wasm.caml_pasta_fq_plonk_index_write( |
228 | | - append, |
229 | | - t, |
230 | | - caml_jsstring_of_string(path) |
231 | | - ); |
232 | | -}; |
0 commit comments