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

feat: pass in closure to Driver to signal backend opcode support #1349

Merged
merged 5 commits into from
May 17, 2023

Conversation

TomAFrench
Copy link
Member

Related issue(s)

Related to #1102 as it makes the backend dependency explicit.

Description

Summary of changes

This PR makes the Noir compiler frontend's dependency on a backend explicit as we now pass in a closure to describe which opcodes it supports to use when dealing with foreign functions.

For now this still uses the default support function but should be updated once noir-lang/acvm#273 makes its way into this repository. Once this is done then we can remove those functions for the 0.13.0 release of ACVM.

Dependency additions / changes

Test additions / changes

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Additional context

@TomAFrench TomAFrench changed the title feat: pass in closure to Driver to signal opcode support feat: pass in closure to Driver to signal backend opcode support May 16, 2023
@TomAFrench
Copy link
Member Author

This is technically breaking to the driver. I'm inclined to mark this as non-breaking however as it doesn't break nargo/noir_wasm and we don't make stable releases of the driver.

@kevaundray kevaundray enabled auto-merge May 16, 2023 09:58
@kevaundray kevaundray added this pull request to the merge queue May 16, 2023
kevaundray
kevaundray previously approved these changes May 16, 2023
@kevaundray kevaundray removed this pull request from the merge queue due to a manual request May 16, 2023
@TomAFrench
Copy link
Member Author

Blocking this as I need to make a couple of tweaks

@TomAFrench
Copy link
Member Author

Annoyingly we can't easily clone this closure which is going to cause issues when removing all the copies of default_is_opcode_supported

@TomAFrench TomAFrench enabled auto-merge May 17, 2023 08:55
@TomAFrench TomAFrench added this pull request to the merge queue May 17, 2023
Copy link
Contributor

@kevaundray kevaundray left a comment

Choose a reason for hiding this comment

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

Looks good, though honestly want to remove this closure from the Noir compiler process in the near-future

Merged via the queue into master with commit 1e958c2 May 17, 2023
@TomAFrench TomAFrench deleted the custom-opcode-support branch May 17, 2023 23:14
TomAFrench added a commit that referenced this pull request May 18, 2023
* master:
  fix: Fix modulo operator for comptime values (#1361)
  chore: clarify that `verify_signature` takes a hashed message (#1365)
  feat: pass in closure to `Driver` to signal backend opcode support (#1349)
  feat(nargo)!: retire print-acir in favour of flag (#1328)
  chore(ssa): enable cse for assert (#1350)
  chore(ssa refactor): Add basic instruction simplification (#1329)
  chore(noir): Release 0.6.0 (#1279)
TomAFrench added a commit that referenced this pull request May 18, 2023
* master:
  fix: Fix modulo operator for comptime values (#1361)
  chore: clarify that `verify_signature` takes a hashed message (#1365)
  feat: pass in closure to `Driver` to signal backend opcode support (#1349)
  feat(nargo)!: retire print-acir in favour of flag (#1328)
  chore(ssa): enable cse for assert (#1350)
  chore(ssa refactor): Add basic instruction simplification (#1329)
  chore(noir): Release 0.6.0 (#1279)
TomAFrench added a commit that referenced this pull request May 18, 2023
* master:
  fix: Fix modulo operator for comptime values (#1361)
  chore: clarify that `verify_signature` takes a hashed message (#1365)
  feat: pass in closure to `Driver` to signal backend opcode support (#1349)
  feat(nargo)!: retire print-acir in favour of flag (#1328)
  chore(ssa): enable cse for assert (#1350)
  chore(ssa refactor): Add basic instruction simplification (#1329)
  chore(noir): Release 0.6.0 (#1279)
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.

2 participants