We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a457d00 commit 16db348Copy full SHA for 16db348
src/lib/crypto/kimchi_bindings/js/node_js/node_backend.js
@@ -1,2 +1,16 @@
1
// Provides: plonk_wasm
2
var plonk_wasm = require('./plonk_wasm.js');
3
+var native = null;
4
+try {
5
+ native = require('../native/plonk_napi.node');
6
+} catch (e) {
7
+ // native not available, keep WASM
8
+}
9
+
10
+// Overwrite only the functions that are already available in native
11
+if (native && native.caml_pasta_fp_poseidon_block_cipher) {
12
+ plonk_wasm.caml_pasta_fp_poseidon_block_cipher = native.caml_pasta_fp_poseidon_block_cipher;
13
14
+if (native && native.caml_pasta_fq_poseidon_block_cipher) {
15
+ plonk_wasm.caml_pasta_fq_poseidon_block_cipher = native.caml_pasta_fq_poseidon_block_cipher;
16
0 commit comments