Tracking Issue for `raw_dylib_macho`
@madsmtm is already working on this.
Since Sep 9, 2025.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for raw-dylib on Mach-O (no RFC, extending RFC 2627)
The feature gate for the issue is #![feature(raw_dylib_macho)].
raw-dylib on Mach-O links against a "Text-Based Stub" file (.tbd)[^tbd], allowing linking against libraries and frameworks that are not present on the host system (for example for cross-compilation scenarios).
See the unstable book (TODO) for example usage. See also https://github.com/rust-lang/rust/issues/58713 and https://github.com/rust-lang/rust/issues/135694.
[^tbd]: This is mostly an implementation detail that makes it nicer to inspect, it's possible to describe the same information in a generated stub .dylib.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Initial implementation (https://github.com/rust-lang/rust/pull/146357)
- Wider testing
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Should we allow omitting the
verbatimmodifier? How well is this supported bydyld? - Add some way to specify
current-versionandcompatibility-version. - Should these overwrite the SDK, or augment the SDK? Especially relevant for the version fields above, could we make it so that the version is used from the SDK unless specified in Rust?
- Should we avoid linking an SDK if
raw-dylibis the only linkage requested? How would that interact with https://github.com/rust-lang/rust/issues/121293? - How do we make
libcuse this?
Implementation history
- First attempt at an implementation: https://github.com/rust-lang/rust/pull/100703
- Second implementation: https://github.com/rust-lang/rust/pull/146357
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.