Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds wasm methods for serialising and deserialising an acir structure #331

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

kevaundray
Copy link
Contributor

No description provided.

wasm-pack build --target nodejs
pub fn acir_from_bytes(bytes: Vec<u8>) -> JsValue {
console_error_panic_hook::set_once();
let circuit = Circuit::from_bytes(&bytes);
JsValue::from_serde(&circuit).unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems some people suggest not to use JsValue::from_serde anymore?
rustwasm/wasm-bindgen#3031

@guipublic guipublic merged commit 6c74bf2 into gd/serialise_circuit Sep 2, 2022
@guipublic guipublic deleted the kw/serialise_circuit_add_wasm branch September 2, 2022 16:39
guipublic added a commit that referenced this pull request Sep 9, 2022
* Serialize ACIR circuits into bytes
Using messagepack format + compression

* Add a  'compile' command in Nargo
to generate circuit and witness

* Adds wasm methods for serialising and deserialising an acir structure (#331)

* add serialisation methods for acir

* update generated wasm:

wasm-pack build --target nodejs

* fix clippy issues

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants