Skip to content

Commit 6ea5599

Browse files
authored
Merge pull request #17951 from MinaProtocol/native/napi-gatevector
2 parents 86ebdf0 + 62e8b52 commit 6ea5599

File tree

13 files changed

+721
-570
lines changed

13 files changed

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

0 commit comments

Comments
 (0)