You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bindings layer exports a large set of functions that are being used by o1js and OCaml (proving, data conversion, proofs, etc) - these functions need to be ported over to the native rust ffi incrementally to make them accessible to o1js
jsoo uses neon-rs artefact to (incrementally) call remaining functions in wasm
jsoo converts data coming from js/js-compiled-from-ocaml correctly to a format that neon-rs expects for all remaining functions
the conversion logic in the jsoo bindings code correctly handles native rust ffi data conversion, here's an example, the integration tests will pass if it works
// Provides: caml_pasta_fp_poseidon_block_cipher// Requires: plonk_wasm, tsRustConversion, tsRustConversionfunctioncaml_pasta_fp_poseidon_block_cipher(_fake_params,fp_vector){// 1. get permuted field vector from rustvarwasm_flat_vector=plonk_wasm.caml_pasta_fp_poseidon_block_cipher(tsRustConversion.fp.vectorToRust(fp_vector));varnew_fp_vector=tsRustConversion.fp.vectorFromRust(wasm_flat_vector);// 2. write back modified field vector to original onenew_fp_vector.forEach(function(a,i){fp_vector[i]=a;});}
The text was updated successfully, but these errors were encountered:
all the contents in the wasm bindings folder must be ported over to the new native ffi bindings folder so that they can be accessed natively
just want to note that not all of what we export from Rust is really used by o1js (ever since we swapped out the finite field / EC backends for TS versions)
Trivo25
changed the title
support all needed rust functions through the ffi
jsoo calls all existing bindings functions through neon-rs (ffi) artefact
Mar 27, 2025
The bindings layer exports a large set of functions that are being used by o1js and OCaml (proving, data conversion, proofs, etc) - these functions need to be ported over to the native rust ffi incrementally to make them accessible to o1js
The text was updated successfully, but these errors were encountered: