Repository navigation
quest: plan compile-time ownership for the Swift and C++ bindings - #692
Merged
Merged
Conversation
Follow-ups of the compile-checks spike (#688). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 10, 2026 04:43
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Plans the two follow-ups of the compile-checks spike, moq-dev/rust2#688, in the exporter epic. It changes no code.
Problem
The spike found that Swift's
~Copyablehandles and Clang's typestate and lifetime attributes turn most of the binding tests that break an ownership rule into compile errors. The maintainer decided to adopt both. No quest owned the work.Approach
quest/m1/ffi-export/swift-noncopyable.md[L]: Swift handles become~Copyablestructs, tuples become named structs, and arrays becomeUniqueArray. The hold count is dropped after a release measurement, and Swift 6.4 conformances come in under#if. It is checked on an Apple platform.quest/m1/ffi-export/cpp-attributes.md[S]: C++ gets typestate attributes, lifetime attributes, andapi::borrow<T>, behind macros.Decisions
All settled with the maintainer on 2026-11-09 and recorded in each quest's Plan.
~Copyablehandles, tuples as generated structs, arrays as swift-collections'UniqueArray(rejected: own list type; wait for Swift'sArray; no switch).Option<&T>: ✅ an overload per optional borrowed parameter (rejected: oneborrowing T?signature; a generatedBorrowed<T>).api::borrow<T>(rejected: attributes only; no change).Impact
None: only the quest tree changes.
Alternatives
Folding the Swift hold-count drop into checks-raise: it's linked as related instead, since it only applies once handles are non-copyable.
Follow-ups
None.
Models
Size: S
Implementer: Claude Code, Opus 5.5, high effort
(Written by Opus 5.5 with high)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.01a1c3c4-b4bc-7191-a25a-02e6a1d643d0, round 1The change adds only planning documents and links, changes no executable code or tests, and has no actionable defects.