Skip to content

Merge futures-util and futures-executor to main futures crate #2295

Open
@taiki-e

Description

@taiki-e

I would propose to merge these utility crates to the main futures crate. There are some reasons:

  • futures and futures-util are almost the same except that futures provide executors and channels. Also, both modules (executor and channel) seem to be relatively easy to make optional.
  • Most of the compile time for futures seems due to futures-util, and the compile time reduction by splitting the crate doesn't seem to work very well.
  • Since futures-executor also depends on futures-util, it doesn't seem to have much compile time advantage even if used individually.
  • As said in Add more optional features to the main futures crate #1875 (comment), if futures and futures-util are different crates, it seems impossible to add optional features to futures per module.
    (I don't plan to add a "util" feature that enables the utility itself, but I would like to add features to enable per module in the next major version.)

futures-channel is also a "utility crate", but it's almost independent, so I'm not sure if merging it is really preferable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-blockedStatus: Blocked on something elseS-needs-api-designStatus: Before implementing this, a discussion or decision on the new API is needed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions