Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
feat: update to ACVM 0.12.0 (noir-lang/acvm-simulator#1)
Browse files Browse the repository at this point in the history
chore: fill out optional fields of `Cargo.toml`
  • Loading branch information
TomAFrench authored May 26, 2023
1 parent cf18ba4 commit 0f5d939
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 88 deletions.
91 changes: 52 additions & 39 deletions acvm_js/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions acvm_js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "acvm-simulator"
description = "Typescript wrapper around the ACVM allowing execution of ACIR code"
version = "0.0.0" # x-release-please-version
authors = ["The Noir Team <team@noir-lang.org>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/noir-lang/acvm-simulator"
edition = "2021"
rust-version = "1.66"

Expand All @@ -11,9 +14,9 @@ rust-version = "1.66"
crate-type = ["cdylib"]

[dependencies]
acvm = "0.11.0"
iter-extended = { git = "https://github.com/noir-lang/noir", rev = "0181813203a9e3e46c6d8c3169ad5d25971d4282"}
noirc_abi = { git = "https://github.com/noir-lang/noir", rev = "0181813203a9e3e46c6d8c3169ad5d25971d4282"}
acvm = "0.12.0"
iter-extended = { git = "https://github.com/noir-lang/noir", rev = "b938c7eeaa5ee493b28cad5451e7d5b7921ad934"}
noirc_abi = { git = "https://github.com/noir-lang/noir", rev = "b938c7eeaa5ee493b28cad5451e7d5b7921ad934"}
wasm-bindgen = { version = "0.2.85", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.34"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions acvm_js/src/abi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use acvm::{acir::native_types::Witness, FieldElement};
use acvm::acir::native_types::WitnessMap;
use iter_extended::{btree_map, try_btree_map};
use noirc_abi::{errors::InputParserError, input_parser::InputValue, Abi, MAIN_RETURN_NAME};
use serde::Serialize;
Expand Down Expand Up @@ -61,7 +61,7 @@ pub fn abi_decode(abi: JsValue, witness_map: JsWitnessMap) -> Result<JsValue, Js
console_error_panic_hook::set_once();
let abi: Abi = JsValueSerdeExt::into_serde(&abi).map_err(|err| err.to_string())?;

let witness_map: BTreeMap<Witness, FieldElement> = witness_map.into();
let witness_map = WitnessMap::from(witness_map);

let (inputs, return_value) = abi.decode(&witness_map).map_err(|err| err.to_string())?;

Expand Down
Loading

0 comments on commit 0f5d939

Please sign in to comment.