Skip to content

Project goal for Contracts: primitive ownership assertions#700

Open
dawidl022 wants to merge 5 commits into
rust-lang:mainfrom
dawidl022:contracts-ownership-assertions
Open

Project goal for Contracts: primitive ownership assertions#700
dawidl022 wants to merge 5 commits into
rust-lang:mainfrom
dawidl022:contracts-ownership-assertions

Conversation

@dawidl022

@dawidl022 dawidl022 commented Jun 28, 2026

Copy link
Copy Markdown

I have kept the project goal brief, focusing on the concrete deliverables and high-level impact, as the details have already been discussed in depth in MCP #942.

I am missing the "Team asks" section, since it mentioned that I can leave it blank if I'm unsure.

@Nadrieril I would appreciate a review and guidance on further steps that need to be taken from my side.

Rendered

Comment thread src/2026/contracts-ownership-assertions.md
Comment thread src/2026/contracts-ownership-assertions.md
Comment thread src/2026/contracts-ownership-assertions.md Outdated
Comment thread src/2026/contracts-ownership-assertions.md
@Nadrieril

Copy link
Copy Markdown
Member

This looks overall good to me! I think after that someone from the project goals team should be able to merge it, and I think we just wait for the goal to be approved along with everything else from the 2026 slate?

Goals team: I'm the lang champion for the contracts lang experiment, so it makes sense to me to champion this goal. But the goal doesn't have much team asks, so does it even need a champion? I'm also unsure what's up with the current goal slate, can we still add things to it?

@dawidl022

Copy link
Copy Markdown
Author

Thanks for the review @Nadrieril! I have included the compiler and Miri teams. Since the Miri integration is a large chunk of this goal, I intend to contribute code to the Miri side of the goal too. Since it will likely be a non-trivial feature in Miri, I have marked the support level as "medium".

@Nadrieril Nadrieril left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think we wait for the project goal team now.

View changes since this review

| Status | Proposed |
| Tracking issue | |
| Zulip channel | N/A (an existing stream can be re-used or new streams can be created on request) |
| Needs | Funding |

@nxsaken nxsaken Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field (and the "Needs funding" paragraph below) is outdated; please add a ## Funding section according to the template.

View changes since the review

| Team | Support level | Notes |
| ---------- | ------------- | --------------------------------------- |
| [compiler] | Small | Code reviews |
| [miri] | Medium | Guidance on integration |

@nxsaken nxsaken Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who will champion from miri?

View changes since the review

Comment on lines +71 to +85
#### Implementation

| Task | Owner(s) | Notes |
| ----------- | -------- | ----- |
| Low-level ownership assertion intrinsics available for use in contracts. | @dawidl022 | |
| Higher-level wrapper assertions for typical use cases, including alignment, arrays etc. | @dawidl022 | |
| Prototype integration with Miri - runtime ownership checks should work with the prototype Miri runtime ownership tracker as [implemented by Johannes Hostert](https://github.com/JoJoDeveloping/miri/tree/fulminate).|@dawidl022 | |
| Full Miri runtime ownership support | |

#### Documentation

| Task | Owner(s) | Notes |
| ----------- | -------- | ----- |
| Reference level documentation: explaining the semantics of the ownership primitives, along with basic examples. | @dawidl022 | |
| A tutorial: selecting one of the challenges in https://model-checking.github.io/verify-rust-std/challenges.html and walking the developer through what it means to write the specifications, and testing them using the Miri runtime. | @dawidl022 | |

@nxsaken nxsaken Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the full Miri runtime ownership support task, please add a ## Help wanted section referencing that task. See this goal for an example.

Suggested change
#### Implementation
| Task | Owner(s) | Notes |
| ----------- | -------- | ----- |
| Low-level ownership assertion intrinsics available for use in contracts. | @dawidl022 | |
| Higher-level wrapper assertions for typical use cases, including alignment, arrays etc. | @dawidl022 | |
| Prototype integration with Miri - runtime ownership checks should work with the prototype Miri runtime ownership tracker as [implemented by Johannes Hostert](https://github.com/JoJoDeveloping/miri/tree/fulminate).|@dawidl022 | |
| Full Miri runtime ownership support | |
#### Documentation
| Task | Owner(s) | Notes |
| ----------- | -------- | ----- |
| Reference level documentation: explaining the semantics of the ownership primitives, along with basic examples. | @dawidl022 | |
| A tutorial: selecting one of the challenges in https://model-checking.github.io/verify-rust-std/challenges.html and walking the developer through what it means to write the specifications, and testing them using the Miri runtime. | @dawidl022 | |
| Task | Owner(s) | Notes |
| ----------- | -------- | ----- |
| Implement low-level ownership assertion intrinsics | @dawidl022 | |
| Implement higher-level wrapper assertions | @dawidl022 | Should cover typical use cases, including alignment, arrays, etc. |
| Implement a prototype integration with Miri | @dawidl022 | Runtime ownership checks should work with the prototype Miri runtime ownership tracker as [implemented by Johannes Hostert](https://github.com/JoJoDeveloping/miri/tree/fulminate). |
| Implement full Miri runtime ownership support | | |
| Write Reference-level documentation | @dawidl022 | Should explain the semantics of the ownership primitives, along with basic examples. |
| Write a tutorial | @dawidl022 | Select one of the challenges in https://model-checking.github.io/verify-rust-std/challenges.html, and walk the developer through what it means to write specifications and test them using the Miri runtime. |

View changes since the review

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

Labels

None yet

Projects

Status: To Do

Development

Successfully merging this pull request may close these issues.

3 participants