forest icon indicating copy to clipboard operation
forest copied to clipboard

Avoid all uses of async-std except when spawning tasks

Open lemmih opened this issue 1 year ago • 4 comments

Summary of changes Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #1947

Other information and links

lemmih avatar Sep 22 '22 12:09 lemmih

Unresolved question: What to do about tide? It requires async_std. Can we use a different crate for the RPC server?

lemmih avatar Sep 22 '22 13:09 lemmih

Unresolved question: What to do about tide? It requires async_std. Can we use a different crate for the RPC server?

There was an issue to potentially replace tide, I'd look into either warp or rocket.

edit: the issue https://github.com/ChainSafe/forest/issues/1761

LesnyRumcajs avatar Sep 22 '22 13:09 LesnyRumcajs

Or maybe actix. The jsonrpc-v2 library has support for that crate but maybe that doesn't mean much.

lemmih avatar Sep 22 '22 13:09 lemmih

actix was a bit rough the last time I used it; the API wasn't as high-level as it could be. Perhaps something changed though.

LesnyRumcajs avatar Sep 22 '22 14:09 LesnyRumcajs

Nice! Could you update the branch with the new toolchain? (will be easier to switch branches).

elmattic avatar Sep 30 '22 09:09 elmattic

Nice! Could you update the branch with the new toolchain? (will be easier to switch branches).

Done.

lemmih avatar Sep 30 '22 12:09 lemmih

Did you try moving to tokio::test too? Or maybe we will just port the tests in a separate PR?

~~Same question for using tokio::net::TcpListener.~~ -> related to tide issue mentionned in the PR summary.

elmattic avatar Oct 03 '22 12:10 elmattic

Did you try moving to tokio::test too? Or maybe we will just port the tests in a separate PR?

We can switch to tokio::test once we're not using async-std tasks anymore.

lemmih avatar Oct 03 '22 12:10 lemmih