#1321

feat(storage): validate engine-device compatibility statically

DraftMrCroxxwants to merge intofrom

Summary

  • preserve concrete device types through DeviceBuilder and validate engine-device pairs before type erasure
  • add the extensible DeviceFor marker trait, a centralized BlockEngine compatibility list, and targeted compiler diagnostics
  • expose concrete device and partition types needed by downstream implementations
  • move runtime device selection in foyer-bench after static engine-config construction
  • add compile-pass and compile-fail coverage for built-in pairs and downstream extension paths
  • keep compile-time UI tests isolated from the madsim runtime feature set
  • align the local cargo x license step with CI's HawkEye configuration

API compatibility

  • DeviceBuilder now declares an associated Device type and returns Arc<Self::Device>
  • BlockEngineConfig::new requires the concrete device type to implement DeviceFor<Self>
  • callers that erase a device to Arc<dyn Device> before engine construction must delay erasure or erase the completed EngineConfig instead

Testing

  • cargo x --fast
  • RUSTFLAGS='--cfg tokio_unstable --cfg madsim' cargo nextest run --workspace --exclude foyer-bench --exclude examples --no-default-features --features 'runtime-madsim-tokio'

Activity

3
codecov[bot]2mo ago

Codecov Report

:x: Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.

... and 2 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.

This pull request is a draft

Merging is unavailable until it is marked ready for review.