See objc2
for top-level documentation, including its documentation on framework crates. Also check out block2
and dispatch2
.
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, we have a Matrix workspace, feel free to ask any questions in the "Users" room.
The licensing of the project is a bit complicated, see
LICENSE.md
for details.
This repository is a merge of the following projects, see reasoning for the fork here:
objc
, renamed toobjc2
.objc-encode
, renamed toobjc2-encode
.objc_exception
, moved toobjc2::exception
.objc_id
, moved toobjc2::rc
.objc-foundation
, renamed toobjc2-foundation
.block
, renamed toblock2
.
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 familyrust-macios
uikit-sys
and@simlay
's Objective-C work onbindgen
cidre
- the
apple-media
project dispatch
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
- D: somewhat built-in support,
derelict
- V: Not really existing, they just write and compile Objective-C code, and use manual C-bindings.
- Go: MacDriver