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

Refactor out UDL file in favor of proc macros #200

Open
chancehudson opened this issue Jul 4, 2024 · 1 comment
Open

Refactor out UDL file in favor of proc macros #200

chancehudson opened this issue Jul 4, 2024 · 1 comment

Comments

@chancehudson
Copy link
Collaborator

Problem

The current app! macro implements the functions defined in the udl file. This is clunky because we always have to define each function even if we're not compiling support for said functions. The macro itself is also primitive and unhygienic and prevents the user from exposing additional custom functions over the ffi.

Details

To solve this we can switch to use macros like #[uniffi::export] to expose functions directly from the rust code. We can expose our own macros that wrap these functions like export_circom!.

Acceptance criteria

This issue only includes switching the existing code from static udl file to macros. This includes updating the build system so that the ios/android build commands handle generating the swift/kotlin bindings.

The mopro.udl file should be removed along with the committed bindings.

Next steps (optional)

After this issue is complete halo2 integration should be easier/more robust and we can allow the user to define their own functions that are exposed over ffi.

@ElusAegis
Copy link
Contributor

Related to #201 where there was an early work on supporting proc_marco in Mopro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants