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

Add conditional compilation for field sizes #526

Closed
kevaundray opened this issue Nov 26, 2022 · 0 comments · Fixed by #3045
Closed

Add conditional compilation for field sizes #526

kevaundray opened this issue Nov 26, 2022 · 0 comments · Fixed by #3045
Assignees
Labels
compiler enhancement New feature or request

Comments

@kevaundray
Copy link
Contributor

Problem

Some functions require different parameters depending on the field being used. An example of this is poseidon, or the embedded curve that one can use.

Solution

One way to allow for this is to have a #[(field = "bls12381")] and or a #[(field = {primeNumber})] attribute which allows functions/modules to be conditionally compiled depending on the field being used.

Alternatives considered

One could manually namespace the function names, ie foo_bn254, foo_bls12_381 and change the code being called depending on whether the field changes

Additional context

(If applicable.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants