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

async-std support for attribute macro #117

Open
allan2 opened this issue Sep 4, 2024 · 0 comments
Open

async-std support for attribute macro #117

allan2 opened this issue Sep 4, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@allan2
Copy link
Owner

allan2 commented Sep 4, 2024

In the new attribute macro, async-std expansion does not work. This is due to differences between how tokio::main expands and async_std::main expands.

Here are some suggestions for those wishing to take this on:

  • use cargo-expand
  • you can determine that you're in async-std when asyncness is true and fn_name is main
  • don't have async-std as a dependency in dotenvy-macros
  • ensure load_and_modify should be called before the async runtime is spawned
  • ensure it works with different function signatures, e.g., Result, empty
  • add examples like those for tokio

PRs are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant