Skip to content

project-safe-transmute #21

@nikomatsakis

Description

@nikomatsakis
Contributor

Summary

Figuring out how we can make safe ways to transmute.

Links

Activity

nikomatsakis

nikomatsakis commented on Jun 11, 2020

@nikomatsakis
ContributorAuthor
  • 2020-04-16: current plans are working towards a “much reduced” proposal:
    • what is the minimal trait (or set of traits) to allow some of this to live in libs
    • still in brainstorming state
  • Repo with marker traits
    • Some set of marker traits (similar to Copy wrt implementations) → enable operations
      • Opt in (for backwards compatibility, in particular around marker traits exposing internal implementation details unintentionally in a semver-breaking way)
    • Partial progress on determining marker traits.
nikomatsakis

nikomatsakis commented on Jun 11, 2020

@nikomatsakis
ContributorAuthor
  • 2020-06-01: Crate posted to the ecosystem experimenting with some of the traits discussed before
    • Trying to figure out if that is covering our needs and whether it can/should transition to compiler
    • Recent experiment used const generics to figure out things like “does a structure have alignment requirements” without requiring special compiler support — so maybe const generics can be used instead to enable?
nikomatsakis

nikomatsakis commented on Jun 22, 2020

@nikomatsakis
ContributorAuthor

2020-06-22:

  • We have a scheduled meeting that includes a lot of details with the current status and, possibly, another write-up being prepared.
nikomatsakis

nikomatsakis commented on Jul 6, 2020

@nikomatsakis
ContributorAuthor

2020-07-06:

  • We had the design meeting and will publish the minutes.
  • We are looking for what are some "minimal steps" lang can take to unblock progress here, with the goal of taking the typic-approach of having libraries experimenting with traits and systems for defining safe transmute.
  • One suggestion was to introduce some marker traits that different libraries can use, though this is more of a library concern. Another option might to include some intrinsic const fn or other function for determining when types are "equivalent" etc.
  • Next step is to figure out what those steps are and prepare an RFC for them.
nikomatsakis

nikomatsakis commented on Jul 20, 2020

@nikomatsakis
ContributorAuthor

2020-07-20:

  • Gearing up to actually post RFC based on the results from previous discussion. Still iterating.
nikomatsakis

nikomatsakis commented on Aug 3, 2020

@nikomatsakis
ContributorAuthor

2020-08-03:

rylev

rylev commented on Aug 13, 2020

@rylev
Member

The draft RFC posted above is ready for review. We'd love to have final feedback before posting to the RFCs repo.

The RFC is quite long, but a large part of it is motivation. If you're already convinced that safe transmute opens up a large amount of features for moving currently unsafe code to safe, then you can skip that section.

We'd primarily like to review the overall path forward and whether the mechanisms proposed seem like a reasonable path. Additionally, there is a "MVP" proposal which aims to be a first step in implementing the wider vision. Please let us know if that seems reasonable too.

nikomatsakis

nikomatsakis commented on Aug 31, 2020

@nikomatsakis
ContributorAuthor

2020-08-31:

There has been a lot of iteration and there is now a draft RFC that is ready for lang-team review. There is a "TL;DR" summary that explains the intentions and plan. The full RFC is extremely detailed and almost tutorial-esque. Now at the point where it's time to read through it and decide whether to go forward.

Lang team recommends opening the RFC on the rfcs repo.

rylev

rylev commented on Sep 3, 2020

@rylev
Member

The RFC has been posted. 🎉 A big shout out to @jswrenn for the really well crafted RFC.

Besides general feedback, I think it would be particularly interesting to get feedback on the MVP proposal as well as the stability guarantee mechanism which so far seems to be the most controversial aspect of the RFC.

jswrenn

jswrenn commented on Sep 3, 2020

@jswrenn
Member

I've also written some supplementary text on why there's a stability problem in the first place: https://jack.wrenn.fyi/blog/transmutation-stability/

joshtriplett

joshtriplett commented on Sep 7, 2020

@joshtriplett
Member

We discussed this in the lang team meeting today.

@rust-lang/lang folks should look at the RFC and post comments. In particular, in addition to posting issues, please post comments if you think part or all of it looks good, so we can help set direction.

19 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

lang-initiativeAn active lang team initiative

Type

No type

Projects

Status

Experimental

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @nikomatsakis@joshtriplett@rylev@jswrenn@scottmcm

      Issue actions

        project-safe-transmute · Issue #21 · rust-lang/lang-team