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(runtime): use macros for Rust <-> JS bindings #320

Merged
merged 1 commit into from
Nov 26, 2022

Conversation

QuiiBz
Copy link
Member

@QuiiBz QuiiBz commented Nov 26, 2022

About

Use two macros for Rust <-> JS bindings, instead of duplicating code (particularly with async bindings).

Now you can use

  • binding!() for sync bindings, that take the same binding function as before
  • async_binding!() for async bindings, which take a function to return the parsed args, and a second function that is async and returns a PromiseResult. This last function is basically the future we created before.

@vercel
Copy link

vercel bot commented Nov 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Updated
dashboard ⬜️ Ignored (Inspect) Nov 26, 2022 at 9:30PM (UTC)
docs ⬜️ Ignored (Inspect) Nov 26, 2022 at 9:30PM (UTC)
storybook ⬜️ Ignored (Inspect) Nov 26, 2022 at 9:30PM (UTC)
www ⬜️ Ignored (Inspect) Nov 26, 2022 at 9:30PM (UTC)

@QuiiBz QuiiBz enabled auto-merge (squash) November 26, 2022 21:31
@QuiiBz QuiiBz merged commit f866de4 into main Nov 26, 2022
@QuiiBz QuiiBz deleted the refactor/runtime-macros branch November 26, 2022 21:36
@QuiiBz QuiiBz mentioned this pull request Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant