Skip to content

Add Brillig support#4

Merged
benjaminwilson merged 2 commits intonoir-r1cs-compilerfrom
add-brillig
Mar 23, 2025
Merged

Add Brillig support#4
benjaminwilson merged 2 commits intonoir-r1cs-compilerfrom
add-brillig

Conversation

@benjaminwilson
Copy link
Copy Markdown
Collaborator

Brillig is used by the ACVM for solving for the ACIR witness values (the values that are available in witness_stack), and this is its only purpose. Thus adding support for Noir programs that generate Brillig instructions required only mapping all the ACIR witness values to the R1CS witness values (previously we were mapping over only the ACIR inputs, which excluded the intermediate ACIR witnesses introduced by Brillig).

I tested this out with the following program (dissected here):

main.rs:

fn main(a: Field, b: Field) {
	if a == 1 {
		assert(b == 2);
	}
}

Nargo.toml:

a = "1"
b = "2"

Comment thread noir-r1cs/src/sparse_matrix.rs
Comment thread noir-r1cs/src/sparse_matrix.rs Outdated
Comment thread noir-r1cs/src/main.rs
@benjaminwilson benjaminwilson merged commit ee41746 into noir-r1cs-compiler Mar 23, 2025
0 of 2 checks passed
@benjaminwilson benjaminwilson deleted the add-brillig branch March 24, 2025 01:17
Bisht13 added a commit that referenced this pull request Feb 20, 2026
…cross-evals, PrefixCovector tests

- Remove R1CSSolver trait, convert test_witness_satisfaction to free fn (#3)
- Make w2_layers compression conditional on has_challenges (#4)
- Parallelize cross-evaluation dot products with rayon::join (~12% prove speedup) (#6)
- Add debug_assert in PrefixCovector::accumulate (#11)
- Add PrefixCovector unit tests: size, mle_evaluate, accumulate, prefix=logical (#2)
- Fix clippy: &mut Vec -> &mut [] in solve_witness_vec
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