#1368

refactor!: remove madsim support and runtime adapter

OpenMrCroxxwants to merge intofrom

Foyer now depends directly on upstream Tokio. Remove the simulation runtime dependency, the foyer-tokio adapter crate, runtime-selection features, conditional compilation, CI job, xtask command, and related changelog references.

Breaking change: remove runtime-tokio and runtime-madsim-tokio. Consumers should remove these feature selections; Tokio is used automatically, including with default-features = false.

Validation:

  • Default and no-default-features workspace nextest runs with strict_assertions: 113 passed and 1 skipped each.
  • Workspace doctests: 4 passed.
  • Clippy across all workspace targets with strict assertions, serde, tracing, clap, and deadlock; tokio-console checked separately.
  • Rust 1.91.0 minimum-version check for foyer without default features; isolated checks for common, memory, and storage crates.
  • Stable/nightly formatting, TOML formatting, typos, cargo-machete, and license headers.
  • Repository and resolved dependency graph checked for remaining simulation/runtime-adapter references.

The benchmark's existing tracing and tokio-console setup functions cannot be enabled together, so those configurations were checked separately as in CI.

Downstream simulation compatibility: RisingWave currently locks foyer 0.22.3 and enables runtime-madsim-tokio. Its existing locked build is unaffected, but migrating to this change requires a downstream simulation adapter. Removing the feature selection alone leaves foyer using real Tokio: a focused test reproduced Spawner::current() panicking inside a madsim runtime. A crates.io patch alias cannot replace the tokio package with madsim-tokio; a same-name forwarding shim also creates a dependency cycle because madsim itself depends on Tokio. The pinned madsim runtime additionally lacks shutdown_background(), which foyer now calls unconditionally.

Activity

2
codecov[bot]1mo ago

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests.

... and 3 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.