From 67d91d12093aa6d79183d3ce3d242eb7c758db8d Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 19 Dec 2023 00:48:42 +0000 Subject: [PATCH] chore!: remove circuit methods from noir_wasm --- compiler/wasm/src/circuit.rs | 18 ------------------ compiler/wasm/src/lib.rs | 2 -- 2 files changed, 20 deletions(-) delete mode 100644 compiler/wasm/src/circuit.rs diff --git a/compiler/wasm/src/circuit.rs b/compiler/wasm/src/circuit.rs deleted file mode 100644 index fdd9a7d9a20..00000000000 --- a/compiler/wasm/src/circuit.rs +++ /dev/null @@ -1,18 +0,0 @@ -use acvm::acir::circuit::Circuit; -use gloo_utils::format::JsValueSerdeExt; -use wasm_bindgen::prelude::*; - -// Deserializes bytes into ACIR structure -#[wasm_bindgen] -pub fn acir_read_bytes(bytes: Vec) -> JsValue { - console_error_panic_hook::set_once(); - let circuit = Circuit::deserialize_circuit(&bytes).unwrap(); - ::from_serde(&circuit).unwrap() -} - -#[wasm_bindgen] -pub fn acir_write_bytes(acir: JsValue) -> Vec { - console_error_panic_hook::set_once(); - let circuit: Circuit = JsValueSerdeExt::into_serde(&acir).unwrap(); - Circuit::serialize_circuit(&circuit) -} diff --git a/compiler/wasm/src/lib.rs b/compiler/wasm/src/lib.rs index 43095fee4d4..d0394589578 100644 --- a/compiler/wasm/src/lib.rs +++ b/compiler/wasm/src/lib.rs @@ -12,12 +12,10 @@ use serde::{Deserialize, Serialize}; use std::str::FromStr; use wasm_bindgen::prelude::*; -mod circuit; mod compile; mod compile_new; mod errors; -pub use circuit::{acir_read_bytes, acir_write_bytes}; pub use compile::compile; // Expose the new Context-Centric API