Skip to content

generate sync API async API #7

@2bndy5

Description

@2bndy5

I just ran across this procedural macro (function that generates code at compile time) library called maybe-async-cfg.

Basically, this would allow conditionally exposing/compiling async or sync (or both) flavored APIs. The beauty is that we'd only have to write the async code, and this maybe-async-cfg library will generate the sync flavored API.

Considerations

  1. This isn't hard requirement. User's can still wrap sync code in an async runtime tasks.
  2. Addressing this may not be as easy as adding await and async keywords where applicable.
  3. The library already has a block-less RF24::write() function designed for using interrupts...
  4. Node.js binding (using napi-rs project) support exposing (rust native) async code
  5. Python binding (using pyo3) does not yet officially support exposing (rust native) async code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions