Closed
Description
Related projects to draw inspiration from:
-
fruity
: I'd like to contribute nvzqz/fruity#13- They have an
ObjectType
trait, which allows abstracting over theretain
/release
methods. I can see the appeal, but it fundamentally won't really work with our crate structure, and I think it's also more user-friendly ifCoreFoundation
-like types get their ownrc::Id
-like type. - They have a bit of safe bindings for
CoreFoundation
-like types, we could yet take some inspiration there.~ Moved to Add support forCoreFoundation
-like libraries #556. - They add lifetimes to everything, even
Object
, which I've found to be overkill for almost all applications - Their
objc
module is similar to ourruntime
StaticWritten a note in our code about it,NSNumber
s andNSNull
- The rest is either not relevant, or has been cherrypicked as fit
- They have an
-
objc-rs
(not on crates.io) -
cacao
- I believe I've grabbed the most important stuff by now, if not, then the full migration of that crate should highlight if
objc2
/icrate
is lacking something.
- I believe I've grabbed the most important stuff by now, if not, then the full migration of that crate should highlight if
-
objrs
- There are some things that could be useful for making
declare_class!
static some day - Also for this, it is possible for fields to be
Default
, since they implement the special CXX constructor. Perhaps use their. I have written that as a doc comment on theexception.rs
assembly code approach to allow handling exceptions without invokingclang
try_catch
method we're exposing inobjc_sys
.
- There are some things that could be useful for making
-
cocoa
/core-foundation
/core-graphics
-
rustkit
- This one actually surprised me by how good it is. Could perhaps have been a starting point for
header-translator
? But irrelevant now.
- This one actually surprised me by how good it is. Could perhaps have been a starting point for
-
uikit-sys
-
objr
: Praise! (Also, let's collaborate!) drewcrawford/objr#1- Different license, so muddy waters!
-
blocksr
- I've looked through it, it doesn't have much we can use, except perhaps the
async
support, which I've moved toasync
support #279.
- I've looked through it, it doesn't have much we can use, except perhaps the
-
rust-macios
: Useobjc2
martial-plains/rust-macios#63 -
apple-sys
: Let's collaborate onobjc2
! youknowone/apple-sys#9 -
objc-derive
-
swift-rs
- Objective-Rust (blog post)
-
cidre
. Moved to Collaborate with / grab ideas fromcidre
#557.
Related projects in other languages:
- Swift: Built-in
@objc
attribute - Python: PyObjC (previously?) official Apple project which works with "BridgeSupport", they also generate metadata by invoking Clang,
objp
- Go: MacDriver
- C#: Xamarin, Xamarin.Mac
- Ruby: MacRuby, RubyCocoa
- Dart:
ffigen
- Java: Java-Objective-C-Bridge, Apple also has a very old official project
- Node.js: NodObjC,
objc
- Zig: zig-objcrt
- Nim: somewhat built-in support,
darwin
,objc
- V: Not really existing, they just write and compile Objective-C code, and use manual C-bindings
- D: somewhat built-in support,
derelict
Linking to other runtimes was done in #19
And other initiatives: