Consider producing empty slices under cfg(miri)
- Dominant language
- Rust
- Stars
- 890
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
Currently accessing a distributed slice under Miri makes the interpreter abort.
```console
test readme ... error: unsupported operation: `extern` static `BENCHMARKS::LINKME_START` from crate `example` is not supported by Miri
--> tests/example.rs:22:19
|
22 | for _bench in BENCHMARKS { /* ... */ }
| ^^^^^^^^^^ `extern` static `BENCHMARKS::LINKME_START` from crate `example` is not supported by Miri
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
= note: BACKTRACE:
= note: inside `readme` at tests/example.rs:22:19: 22:29
```
It would be reasonable to use `cfg(miri)` to produce a Miri-compatible stub implementation that always contains no elements.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Miri failure in tests/example.rs and reproduce the distributed-slice access under Miri. Inspect the distributed slice implementation to determine the cfg(miri) path, then verify that Miri sees an empty slice and that the existing tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100