-
Notifications
You must be signed in to change notification settings - Fork 68
refactor: introduce Spawner and foyer-tokio crate
#1229
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
tisonkun
reviewed
Dec 18, 2025
foyer-tokio/Cargo.toml
Outdated
Comment on lines
39
to
56
| fs = ["runtime-tokio?/fs", "runtime-madsim-tokio?/fs"] | ||
| io-util = ["runtime-tokio?/io-util", "runtime-madsim-tokio?/io-util"] | ||
| io-std = ["runtime-tokio?/io-std", "runtime-madsim-tokio?/io-std"] | ||
| macros = ["runtime-tokio?/macros", "runtime-madsim-tokio?/macros"] | ||
| net = ["runtime-tokio?/net", "runtime-madsim-tokio?/net"] | ||
| parking_lot = [ | ||
| "runtime-tokio?/parking_lot", | ||
| "runtime-madsim-tokio?/parking_lot", | ||
| ] | ||
| process = ["runtime-tokio?/process", "runtime-madsim-tokio?/process"] | ||
| rt = ["runtime-tokio?/rt", "runtime-madsim-tokio?/rt"] | ||
| rt-multi-thread = [ | ||
| "runtime-tokio?/rt-multi-thread", | ||
| "runtime-madsim-tokio?/rt-multi-thread", | ||
| ] | ||
| signal = ["runtime-tokio?/signal", "runtime-madsim-tokio?/signal"] | ||
| sync = ["runtime-tokio?/sync", "runtime-madsim-tokio?/sync"] | ||
| time = ["runtime-tokio?/time", "runtime-madsim-tokio?/time"] |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would still lock all the deps due to the limitation of rust-lang/cargo#10801
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or enable full features for madsim by default?
FYI: rust-lang/cargo#10801 Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
Member
Author
|
Let's do it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
.. to switch between
tokioandmadsim.What's changed and what's your intention?
Part of #990 . Yet another attempt after #1211 and #1212
This PR aims to remove the madsim dependency under the default feature.
In order to seamlessly replace all uses of tokio components and tokio macros (such as
tokio::select!andtokio::test, etc.), thefoyer-tokiocrate is introduced as the defaulttokiodependency, and the implementation is switched viaruntime-tokioandruntime-madsim-tokio.In addition, this PR restores the CI for madsim nextest. On CI, only the compilation and tests of the
foyercrate and its dependent crates are checked.Checklist
cargo x(orcargo x --fastinstead if the old tests are not modified) in my local environment.Related issues or PRs (optional)
#990 #1211 #1212