[GH-ISSUE #958] Make tokio crate optional for trust-dns-proto #574

Closed
opened 2026-03-15 23:15:11 +03:00 by kerem · 2 comments
Owner

Originally created by @chunyingw on GitHub (Dec 16, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/958

Hey Ben,

It seems Fuchsia prefers to make the tokio crate optional. I am taking the effort to make that happen for trust-dns-proto by moving from

  1. tokio::io::{AsyncRead, AsyncWrite} to std::io::{AsyncRead, AsyncWrite}
  2. Abstract tokio::time::{Timeout, Delay}.

So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully.

I am going to modify other crates which are impacted because of the interface changes.
Does it sound okay for you?

Originally created by @chunyingw on GitHub (Dec 16, 2019). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/958 Hey Ben, It seems Fuchsia prefers to make the tokio crate optional. I am taking the effort to make that happen for trust-dns-proto by moving from 1. tokio::io::{AsyncRead, AsyncWrite} to std::io::{AsyncRead, AsyncWrite} 2. Abstract tokio::time::{Timeout, Delay}. So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully. I am going to modify other crates which are impacted because of the interface changes. Does it sound okay for you?
kerem closed this issue 2026-03-15 23:15:17 +03:00
Author
Owner

@bluejekyll commented on GitHub (Dec 16, 2019):

I am going to modify other crates which are impacted because of the interface changes.
Does it sound okay for you?

Yes, though:

std::io::{AsyncRead, AsyncWrite}

I think you mean futures::io::{AsyncRead, AsyncWrite}, as there aren't std definitions for these. I didn't realize those worked with Tokio already. That's great news.

So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully.

That's fantastic!

<!-- gh-comment-id:566209324 --> @bluejekyll commented on GitHub (Dec 16, 2019): > I am going to modify other crates which are impacted because of the interface changes. Does it sound okay for you? Yes, though: > std::io::{AsyncRead, AsyncWrite} I think you mean `futures::io::{AsyncRead, AsyncWrite}`, as there aren't std definitions for these. I didn't realize those worked with Tokio already. That's great news. > So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully. That's fantastic!
Author
Owner

@chunyingw commented on GitHub (Dec 16, 2019):

I am going to modify other crates which are impacted because of the interface changes.
Does it sound okay for you?

Yes, though:

std::io::{AsyncRead, AsyncWrite}

I think you mean futures::io::{AsyncRead, AsyncWrite}, as there aren't std definitions for these. I didn't realize those worked with Tokio already. That's great news.
You are absolutely right. It's it's futures:io::{AsyncRead, AsyncWrite}. I use a new type like DnsTokioTcpStream(TokioTcpStream) to achieve this. It's not transparent.

So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully.

That's fantastic!

<!-- gh-comment-id:566212940 --> @chunyingw commented on GitHub (Dec 16, 2019): > > I am going to modify other crates which are impacted because of the interface changes. > > Does it sound okay for you? > > Yes, though: > > > std::io::{AsyncRead, AsyncWrite} > > I think you mean `futures::io::{AsyncRead, AsyncWrite}`, as there aren't std definitions for these. I didn't realize those worked with Tokio already. That's great news. You are absolutely right. It's it's futures:io::{AsyncRead, AsyncWrite}. I use a new type like DnsTokioTcpStream(TokioTcpStream) to achieve this. It's not transparent. > > > So far I am able to build/run/test trust-dns-proto successfully and run the unit tests using Fuchsia's timer, executor on Fuchsia successfully. > > That's fantastic!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#574
No description provided.