Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: consider combining crates #1264

Closed
carllerche opened this issue Jul 4, 2019 · 7 comments
Closed

meta: consider combining crates #1264

carllerche opened this issue Jul 4, 2019 · 7 comments
Milestone

Comments

@carllerche
Copy link
Member

carllerche commented Jul 4, 2019

Tokio has grown into many crates. Maintaining many separate crates requires overhead. I do not believe, in some cases, the benefits outweigh the overhead.

The primary reason to split functionality into crates is to enable releasing breaking changes at a different pace. Collapsed crates can maintain feature flags to enable / disable the various components to provide.

Some possibility of crates to collapse:

  • tokio-executor
    • tokio-current-thread
    • tokio-threadpool
  • tokio-net
    • tokio-process
    • tokio-reactor
    • tokio-signal
    • tokio-tcp
    • tokio-udp
    • tokio-uds
  • tokio-util
    • tokio-sync
    • tokio-timer
@carllerche
Copy link
Member Author

As part of this, I would like to propose moving the I/O helpers back into the tokio-io crate. They would be feature flagged, so you could get tokio-io w/ just the traits. AsyncReadExt and AsyncWriteExt would stay in tokio (so that they can include fns that depend on other crates).

The goal is to be able to use the I/O helpers in other tokio crates (like tokio-fs).

@Ralith
Copy link
Contributor

Ralith commented Jul 10, 2019

tokio-udp
tokio-uds

These have a similar notion of ancillary data, so if/when I or someone gets around to coming up with a safe zero-cost interface to that, having them in one place where they can share abstractions makes sense.

@leaxoy
Copy link

leaxoy commented Jul 22, 2019

And how about combining tokio-executor with tokio-threadpool and tokio-current-thread

@carllerche
Copy link
Member Author

@leaxoy added it to the list 👍

carllerche added a commit that referenced this issue Aug 14, 2019
The `CurrentThread` executor is exposed using a feature flag.

Refs: #1264
carllerche added a commit that referenced this issue Aug 15, 2019
The `CurrentThread` executor is exposed using a feature flag.

Refs: #1264
carllerche added a commit that referenced this issue Aug 15, 2019
carllerche added a commit that referenced this issue Aug 15, 2019
* reactor: rename tokio-reactor -> tokio-net

This is in preparation for #1264
carllerche added a commit that referenced this issue Aug 15, 2019
The threadpool is behind a feature flag.

Refs: #1264
carllerche added a commit that referenced this issue Aug 15, 2019
The threadpool is behind a feature flag.

Refs: #1264
carllerche added a commit that referenced this issue Aug 15, 2019
Space is made to add `tcp`, `udp`, `uds`, ... modules
carllerche added a commit that referenced this issue Aug 15, 2019
Space is made to add `tcp`, `udp`, `uds`, ... modules.
@dario23
Copy link

dario23 commented Oct 2, 2019

i know the decisions here are mostly final/already implemented -- but still: what was the reasoning to put process into the tokio-net crate? could have gone into tokio-util or even tokio-executor (as processes are executed, though i understand tokio's use of the word executor differs here, probably a fair amount of confusion was avoided by not moving process there)

@carllerche
Copy link
Member Author

Crates are split up by their dependencies. -process depends on mio and -net is the crate that pulls in -mio.

@carllerche
Copy link
Member Author

Most crates are now combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants