mozilla / uniffi-rs

a multi-language bindings generator for rust
https://mozilla.github.io/uniffi-rs/
Mozilla Public License 2.0
2.82k stars 229 forks source link

Migrating codebase to new macro system #1459

Open thunderbiscuit opened 1 year ago

thunderbiscuit commented 1 year ago

Our team has been using uniffi-rs for just over a year and we're very happy with what we've been able to accomplish with it (repo here). We are aware of the new proc-macro system being developed, and we have been discussing migrating the codebase to this new system once ready.

I'm opening this issue to ask whether you think there is value is starting this work now or if you think we should wait because the API is still too unstable. We're happy to be early testers of the new system, but I do have some questions as I'm looking to understand more how the new macros will work:

  1. Do you have a branch with docs on how the new system works and how to migrate? I see issue #1302 but have not found a branch with docs in development (happy to check it out and give feedback if it exists somewhere!)
  2. Can the migration happen gradually, or does it have to be done all in one go?

Looking forward to continuing working with the library.

Cheers!

┆Issue is synchronized with this Jira Task ┆Issue Number: UNIFFI-232

badboy commented 1 year ago

There's some documentation available at https://mozilla.github.io/uniffi-rs/proc_macro/index.html We do not (yet) have a migration guide (though I guess at some point this could be useful). There are still some limitations on what works and what doesn't.

And yes, migration can happen gradually: Migrate pieces from the UDL file to the macro system while keeping the UDL in tact.