-
Notifications
You must be signed in to change notification settings - Fork 16
feat!: merge barretenberg_static_lib
and barretenberg_wasm
#117
Conversation
barretenberg_static_lib
and barretenberg_wasm
barretenberg_static_lib
and barretenberg_wasm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to specify dep:
?
I initially had error: Package `acvm-backend-barretenberg v0.1.0 (/home/tom/Programming/aztec_backend/acvm_backend_barretenberg)` does not have feature `wasmer`.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name. So it seems like having a https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies |
Tomorrow I'll probably break out the different flavours of |
3f0d4a5
to
17b9165
Compare
We're currently only testing the native backend due to us merging these two crates. I'd like to pass in the different feature flags so we can build/test the flake with both backends as otherwise we'll not be testing the wasm backend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some general comments; was reading to understand more about this issue: noir-lang/acvm#211
* master: chore: Add logic constraint test from C++ acir_format tests (#125)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things I noticed when I pulled this down locally.
Ah, this still needs the multiple outputs (native vs wasm) added to the flake as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a few more things. I wonder if we can drop the cfg-if block for all the setup but I won't block on it.
I don't see a good way to do this. Rust doesn't seem to like putting a scope around the two branches (similarly to how we do in |
I'm wondering if it would be better/worse to use your cfg on a mod like you did for crs.rs? |
Yeah, I'm happy with that as it encapsulates more of the wasm internals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Let's get it merged so we can keep iterating on this crate 🎉
This PR starts the work of merging this workspace into a single crate. To simplify things, I've restricted the public interface of the crate to just be the
Plonk
struct (as this is necessary for nargo) to avoid any differences in the interface between targets. We should decide what else we want to expose before merging this.The interfaces of most methods are identical between native and wasm backends. In these cases I've copied across the implementation from
barretenberg_wasm
and placed it in inside the function body frombarretenberg_static_lib
, these are then switched between with feature flags.In a couple of cases the struct interfaces are different (
Barretenberg/StandardComposer/Pippenger
) so I've had to swap them out entirely based on the feature flags.