arnaucube
arnaucube/circom-compatPublic Self-hosted repository
add missing wasm runtime function (#29)

laizy aochyi@126.com
Fri, 06 Jan 2023 00:49:21 +0800
commit

ab7f9ec3a1202117981eb59854fa1aae2b1e4fee

parent

06eb0759e0d15685179f8937841c95ccf2bc86a7

1 files changed, 16 insertions(+), 0 deletions(-)

jump to
M src/witness/witness_calculator.rs → src/witness/witness_calculator.rs

@@ -82,6 +82,8 @@ "logStartComponent" => runtime::log_component(store),

"log" => runtime::log_component(store), "exceptionHandler" => runtime::exception_handler(store), "showSharedRWMemory" => runtime::show_memory(store), + "printErrorMessage" => runtime::print_error_message(store), + "writeBufferMessage" => runtime::write_buffer_message(store), } }; let instance = Wasm::new(Instance::new(&module, &import_object)?);

@@ -328,6 +330,20 @@ }

// Circom 2.0 pub fn show_memory(store: &Store) -> Function { + #[allow(unused)] + fn func() {} + Function::new_native(store, func) + } + + // Circom 2.0 + pub fn print_error_message(store: &Store) -> Function { + #[allow(unused)] + fn func() {} + Function::new_native(store, func) + } + + // Circom 2.0 + pub fn write_buffer_message(store: &Store) -> Function { #[allow(unused)] fn func() {} Function::new_native(store, func)