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

[DRAFT] Add async/await support for oxide-auth-async #165

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FrancisMurillo
Copy link
Contributor

@FrancisMurillo FrancisMurillo commented May 11, 2023

This changes/fixes/improves …

Still fixing the main example work and adding another example to show explicit async/await usage

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

@HeroicKatora
Copy link
Owner

On a general note: I'd actually rather replace the actix bindings with fully asynchronous ones rather than have two separate packages for it, if that sounds appropriate.

@FrancisMurillo
Copy link
Contributor Author

On a general note: I'd actually rather replace the actix bindings with fully asynchronous ones rather than have two separate packages for it, if that sounds appropriate.

I tried doing in a separate crate first to see if there might be any issues with types and compatibility. I did have a problem with the actix actor example since the current implementation of Generic kinda needs to be Clone-able to pass the compiler check.

@FrancisMurillo
Copy link
Contributor Author

@HeroicKatora So this is kinda my async use case. (Mine was diesel but wrapped them in async domain methods.) I think you can inspect the current example while I try to make the original example with Generic work if possible.

@FrancisMurillo
Copy link
Contributor Author

@HeroicKatora Okay, I have tried several attempts to make Generic work within the async actix handler but its kinda tricky without creating thread safe versions generic components or removing the &mut in every Endpoint method which I do not think is ideal. So my current example I think is the easiest way I found so far.

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

Successfully merging this pull request may close these issues.

None yet

2 participants