Idea: Drop the `1.-` from the Rust version

That's arguing against something I didn't say; I'm arguing that, because CHERI is weird, the best place to look for a construct whose informal definition hides two contradictory formal definitions is in places where CHERI needs changes to Rust or LLVM, since those are the places where there's a strong chance that nobody's thought through what the semantics of the language (Rust, or LLVM IR, depending on where you're looking) should be, but instead people are relying on intuition to understand what this construct means.

And the case where I think we might decide that a Rust 2.0 is worth it is the case where four things are true at once:

  1. There is a construct whose formal semantics are now being defined, where previously we relied on informal reasoning.
  2. Defining it one way means that some important existing crates are defined as executing UB on all targets, where under the informal definition, those crates had a reasonable argument that they did not have UB.
  3. Defining it such that the crates in (2) do not have UB results in a different subset of important existing crates being defined as executing UB on all targets, where under the informal definition, those crates had a reasonable argument that they did not have UB.
  4. The definitions in (2) and (3) cannot be usefully combined - e.g. because they are contradictory.

If you can find a construct where all four of those statement are true, then you've found something that might justify a Rust 2.0 - all safe Rust code that compiled under 1.x has the same meaning under 2.0, but there exists unsafe code that used to be plausibly defined behaviour, but is now clearly UB.

I expect Rust 2.0 will be when trait implementations are no longer global and the orphan rule will be no longer necessary.

1 Like

I would argue that we should keep the leading 1.- even if we knew for certain it would never change again. It's a valuable signal to our users that we haven't done anything that would warrant a major version bump. If you start using major version bumps for everything then what you're signaling is "we can't be bothered to tell you if there's breaking changes or not, you're on your own." I don't like it in anything and I especially don't like it in the context of a tool like Rust that actually does make strong compatibility guarantees.

13 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.