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
@mitschabaude, not quite sure what you're saying here:
at least the wasm bindings methods tested in this file are no longer used (except in this test, which checks that the TS versions behave the same):
There's a word missing haha. Do you mean to say, "at least some of the wasm bindings methods?" Or do you mean to say that all of the methods in that test aren't being used.
Any ideas on how best to track this? I want to avoid wasting time porting over methods that aren't being used.
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: