n0-computer / n0-computer/n0-future

APIs missing / APIs that need to be re-evaluated

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
20
Forks
2
PR merge metrics
No merged PRs in 30d

Description

We're currently exposing

  • futures_util::TryFutureExt
  • futures_util::TryStreamExt

And we might want to re-evaluate exposing them. I thought I added them for a good reason, but I can't grep any uses for them in iroh now.

We might also want to not expose futures_lite::io::AsyncRead and friends, given we usually use tokio's AsyncRead.

We've also found some APIs that might be nice-to-have, e.g.

  • futures_util::FutureExt::flatten_stream, which doesn't exist in futures_lite::FutureExt, and we use in iroh.
  • futures_util::FutureExt::map, which also doesn't exist in futures_lite::FutureExt, but is used in iroh-gossip.

We should also take another look at std::pin::pin! as a replacement for tokio::pin! or futures_lite::pin!. It doesn't seem to be a direct replacement, but we just might've been holding it wrong.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by auditing the exposed futures_util and futures_lite APIs and grepping for their uses in iroh and iroh-gossip. Compare the listed FutureExt, TryFutureExt, TryStreamExt, AsyncRead, and pin APIs, then define the revised public surface and verify that existing uses still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.