Skip to content

Make async-std dependency optional #10

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
sdroege opened this issue Jan 4, 2020 · 6 comments · Fixed by #18
Closed

Make async-std dependency optional #10

sdroege opened this issue Jan 4, 2020 · 6 comments · Fixed by #18

Comments

@sdroege
Copy link

sdroege commented Jan 4, 2020

I'm not sure if this is possible, but it would be great if the async-std dependency could be made optional so that (like async-tls) this could also be used by other runtimes (e.g. the one from glib).

@dignifiedquire
Copy link
Contributor

the current version does not use the async-std runtime, it only uses some primitives of it, so it should be runtime agnostic already. I haven’t tested it though

@sdroege
Copy link
Author

sdroege commented Jan 5, 2020

The problem is that it (non-optionally) depends on async-std and brings in a lot of unneeded code (and compile-time) if using it with a different async runtime. Ideally instead of async-std, it would only use whatever is available from the futures crate.

Is there anything used here that is only available in async-std?

@dignifiedquire
Copy link
Contributor

Is there anything used here that is only available in async-std?

yes: https://github.com/async-email/async-native-tls/blob/master/src/acceptor.rs#L60-L61

@sdroege
Copy link
Author

sdroege commented Jan 6, 2020

I see. That makes it rather tricky to make the whole things runtime-independent as you actually depend on async-std :)

@dignifiedquire
Copy link
Contributor

Yeah, I guess it could be behind a default feature flag, and the exposed API that is runtime independent could be smaller

@llebout
Copy link
Contributor

llebout commented Jan 14, 2020

Maybe that solves it? #14

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 a pull request may close this issue.

3 participants