portability-wg icon indicating copy to clipboard operation
portability-wg copied to clipboard

Automatic detection of compatibility

Open jethrogb opened this issue 6 years ago • 1 comments

A lot of existing crates “just work” when using them on another platform or in another environment. Others require minor changes. How does one find such crates? Alternatively, given a crate, how does one know whether it's going to work in their current setup?

This issue is about trying to come up with static analysis tools that can be used to help answer such questions.

Ideas/prior work:

  • RFC 1868
  • https://github.com/rust-lang/rust/issues/41619
  • https://github.com/rust-lang/rust/issues/38509
  • Automatic detection for no_std compatibility https://twitter.com/japaricious/status/968683708092960769
  • @aturon suggested that once a system like this exists, it's no longer necessary to have a separate core and std. Instead, one could leverage this system to enforce portability.

jethrogb avatar Mar 07 '18 16:03 jethrogb

Per my comment in https://github.com/rust-lang/rust/issues/38509#issuecomment-271170949, now that we have an improved [patch], all we need is some of 1133 if we do keep std and core separate.

Ericson2314 avatar Mar 07 '18 19:03 Ericson2314