Skip to content

runtime: Support async-std #70

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

Closed
akiradeveloper opened this issue Aug 4, 2022 · 6 comments
Closed

runtime: Support async-std #70

akiradeveloper opened this issue Aug 4, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@akiradeveloper
Copy link
Owner

akiradeveloper commented Aug 4, 2022

Aside one for tokio, better to have a runtime support for async-std.

@akiradeveloper akiradeveloper added the enhancement New feature or request label Aug 4, 2022
@akiradeveloper akiradeveloper changed the title Support async-std runtime: Support async-std Aug 4, 2022
@akiradeveloper
Copy link
Owner Author

akiradeveloper commented Aug 5, 2022

Another strategy is runtime-agnostic way like hyper does if we can share the rest of the code but spawning.

Agnostik is a library for this purpose but it unfortunately seems unmaintained.

Good articles about runtime agnostic:

@akiradeveloper
Copy link
Owner Author

akiradeveloper commented Aug 5, 2022

https://www.reddit.com/r/rust/comments/fo98kc/announcing_agnostik_executor_agnostic_runtime/

I learned there is an alternative of agnostik called async_executors. This one looks more maintained and supports more runtimes including glommio. (blog: https://blog.wnut.pw/2020/02/25/anouncing-async_executors-a-building-block-for-executor-agnostic-libraries/)

This one looks fascinating to me.

@akiradeveloper
Copy link
Owner Author

akiradeveloper commented Aug 5, 2022

In async-executors, the API is not provided to use the current global Tokio runtime.

The discussion is here

@akiradeveloper
Copy link
Owner Author

Unlike tokio one, JoinHandle in async-executors doesn't have abort method but we could use Abortable to cancel the request.

@akiradeveloper
Copy link
Owner Author

Experimental branch is here https://github.com/akiradeveloper/norpc/tree/generic-runtime

@akiradeveloper
Copy link
Owner Author

done.

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

No branches or pull requests

1 participant