Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

objc2

> 编程语言
Open source

Bindings to Apple frameworks in Rust

992 stars0 likes1 views
WebsiteGitHub

About

Bindings to Apple frameworks in Rust

Rust + [Obj-C]

Objective-C in Rust See objc2 for top-level documentation, including the documentation on framework crates.

Also check out block2 and dispatch2.

Contact

Always feel free to open an issue on GitHub if you find a problem or have any questions.

If you prefer to have a more synchronous and less "formal" discussion, there is a Matrix workspace, feel free to ask any questions in the "Users" room.

Also see CONTRIBUTING.md if you would like to help out.

License

The licensing of the project is a bit complicated, see LICENSE.md for details.

Acknowledgements / Prior art

This repository is a merge of the following projects, see reasoning for the fork here:

  • objc, renamed to objc2.
  • objc-encode, renamed to objc2-encode.
  • objc_exception, moved to objc2::exception.
  • objc_id, moved to objc2::rc.
  • objc-foundation, renamed to objc2-foundation.
  • block, renamed to block2.

These were created almost solely by @SSheldon, so a huge thanks for their fantastic work on these crates!

Additionally, the dispatch2 crate originally lived here.

This project also draws inspiration from:

  • apple-sys
  • cacao
  • the core-foundation-rs project
  • fruity
  • metal
  • objrs
  • objr and family
  • rust-macios
  • uikit-sys and @simlay's Objective-C work on bindgen
  • cidre
  • the apple-media project
  • dispatch
  • apple-rs

Finally, this is by far not the only project that ever tried to interoperate with Objective-C; other languages have done so as well (to varying degrees of success):

  • Swift: Built from the beginning for Objective-C interop, and is what objc2 aspires to have feature-parity with (though will probably never reach). Truly beautifully designed language!
  • C#: Xamarin, Xamarin.Mac, a good source of inspiration for what "should" work.
  • Python: PyObjC (previously?) official Apple project that worked with "BridgeSupport", nowadays they also generate metadata by invoking Clang. Others include objp and rubicon.objc
  • Ruby: MacRuby, RubyCocoa
  • Dart: ffigen
  • Kotlin: somewhat built-in support
  • Nim: somewhat built-in support, darwin, objc
  • D: somewhat built-in support, derelict
  • Java: Java-Objective-C-Bridge, Multi-OS Engine: Nat/J (also has a generator), Apple also has a very old official project.
  • Node.js: NodObjC, objc
  • Zig: zig-objcrt
  • V: Not really existing, they just write and compile Objective-C code, and use manual C-bindings.
  • Go: MacDriver

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustappkitapplecocoaffi-bindings

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言