Skip to content

Conversation

@rolfbjarne
Copy link
Member

@rolfbjarne rolfbjarne commented Feb 4, 2026

Open-source the Objective-Sharpie tool.

  • Port the old closed-source version of Objective-Sharpie to modern .NET, and have it use ClangSharp for its clang integration.
  • This is a simplified port, any features that were not frequently used have been dropped. In particular, only two features remain:
    • Binding an entire OS SDK (which we use for our own bindings).
  • Binding a .framework (to bind third-party bindings).
  • The new sharpie will be distributed as a .NET command-line tool.

Fixes #23962.
Fixes #21573.

Open-source the Objective-Sharpie tool.

* Port the old closed-source version of Objective-Sharpie to modern .NET, and have it use ClangSharp for its clang integration.
* This is a simplified port, any features that were not frequently used have been dropped. In particular, only two features remain:
    * Binding an entire OS SDK (which we use for our own bindings).
	* Binding a .framework (to bind third-party bindings).
* The new sharpie will be distributed as a .NET command-line tool.

Fixes #23962.
@rolfbjarne rolfbjarne requested a review from Copilot February 4, 2026 11:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR open-sources the Objective-Sharpie tool by porting it to modern .NET with ClangSharp integration. The tool generates C# bindings from Objective-C APIs, supporting SDK binding and framework binding workflows. It will be distributed as a .NET command-line tool.

Changes:

  • Ports Objective-Sharpie from closed-source to open-source using ClangSharp for clang integration
  • Implements core binding infrastructure including massagers, attributes, and type system
  • Adds comprehensive test suite with test cases for various binding scenarios

Reviewed changes

Copilot reviewed 299 out of 619 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/sharpie/Sharpie.Bind/*.cs Core binding logic including massagers, type system, and attribute definitions
tools/sharpie/Sharpie.Bind.Tool/*.cs Command-line tool entry point and configuration
tests/sharpie/Tests/**/*.h Test header files for binding scenarios
tests/sharpie/Tests/**/*.cs Expected C# output for test cases
tests/xtro-sharpie/**/*.cs Updates to xtro-sharpie tool to use new ClangSharp-based binding system
tools/common/ProductConstants.in.cs Added SharpieVersion constant
Files not reviewed (1)
  • tools/sharpie/Sharpie.Bind/Resources.designer.cs: Language not supported

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

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

Looking good!

@vs-mobiletools-engineering-service2

This comment has been minimized.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Feb 4, 2026

@rolfbjarne I've opened a new pull request, #24625, to work on those changes. Once the pull request is ready, I'll request review from you.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #f38cb93] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #f38cb93] Build passed (Build packages) ✅

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #f38cb93] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #f38cb93] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #f38cb93] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #f38cb93] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #f38cb93] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #f38cb93] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #f38cb93] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

3 tests crashed, 0 tests failed, 65 tests passed.

Failures

❌ linker tests

🔥 Failed catastrophically on VSTS: test results - linker (no summary found).

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

🔥 Failed catastrophically on VSTS: test results - monotouch_ios (no summary found).

Html Report (VSDrops) Download

❌ monotouch tests (tvOS)

🔥 Failed catastrophically on VSTS: test results - monotouch_tvos (no summary found).

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: f38cb93ecd62ce0319ecd37c3d874f414918d577 [PR build]

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

Labels

objective-sharpie Issues or pull requests affecting Objective Sharpie.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade sharpie to use .NET instead of Mono Port xtro to use .NET instead of Mono

4 participants