{"id":21159154,"url":"https://github.com/rufflewind/futures_become","last_synced_at":"2025-07-17T14:33:19.834Z","repository":{"id":78505779,"uuid":"87158554","full_name":"Rufflewind/futures_become","owner":"Rufflewind","description":"Tail-call elimination for futures","archived":false,"fork":false,"pushed_at":"2021-06-06T08:10:22.000Z","size":1181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T15:49:21.976Z","etag":null,"topics":["concurrency","futures","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rufflewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-04T07:19:50.000Z","updated_at":"2021-06-06T08:11:35.000Z","dependencies_parsed_at":"2023-04-23T23:34:58.101Z","dependency_job_id":null,"html_url":"https://github.com/Rufflewind/futures_become","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rufflewind/futures_become","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Ffutures_become","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Ffutures_become/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Ffutures_become/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Ffutures_become/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rufflewind","download_url":"https://codeload.github.com/Rufflewind/futures_become/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Ffutures_become/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265616657,"owners_count":23798869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","futures","rust"],"created_at":"2024-11-20T12:59:46.110Z","updated_at":"2025-07-17T14:33:19.828Z","avatar_url":"https://github.com/Rufflewind.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `futures_become`\n\n[![Build Status](https://github.com/Rufflewind/futures/actions/workflows/build.yml_become.svg?branch=master)](https://github.com/Rufflewind/futures/actions/workflows/build.yml_become)\n\n[Documentation for the `master` branch](https://rufflewind.com/futures_become)\n\nTail-call elimination for [`futures`](https://crates.io/crates/futures).\n\nDispatching a long chain of futures built with `and_then` may result in a\nlinear cost.  One could avoid this using e.g. `loop_fn`, but this is hard to\ncompose due to shared state.\n\nThis package provides an alternative interface through a `Become` construct,\nwhich acts as a kind of \"tail-call elimination\" at the futures level.  Turns\nout it can be done without modifying the existing `Future` trait, but at the\ncost of changing `Error` type of each future to a wrapped one using `Become`.\nThen, returning `Err(Become::Become(next))` can be used to indicate that the\ncurrent future should be discarded and replaced with `next`.  This of course\nmeans that we have to box each future, as the type of the current future could\nbe wildly different from that of the `next` future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Ffutures_become","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frufflewind%2Ffutures_become","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Ffutures_become/lists"}