rust-objc icon indicating copy to clipboard operation
rust-objc copied to clipboard

Objective-C Runtime bindings and wrapper for Rust.

Results 40 rust-objc issues
Sort by recently updated
recently updated
newest added

For example, the following code: ``` rust let mut a: Id = INSString::from_str("a"); let mut b: Id = INSString::from_str("b"); println!("{} {}", a, b); mem::swap(a.deref_mut(), b.deref_mut()); println!("{} {}", a, b); ```...

It is very convenient to expose a C# class to objc by using attributes. (Usage: https://developer.xamarin.com/guides/ios/advanced_topics/registrar/ Implement: https://github.com/mono/cocoa-sharp/) . Rust has the same attribute system like C#. So is it...

Currently, in the runtime and declare modules, the API takes `&str` for ease of use. However, this requires copying the string into a buffer and adding a nul terminator byte....

Implementing derive for custom structs is tedious, but all the information it needs is in the declaration of the struct: the name, and the type and order of its members....

I believe that, currently, `Object`, `Class`, etc are `Send` and `Sync` because they don't contain any types to specify otherwise. Is this correct? At least, it seems like not all...

`Encode` should be implemented for more types. For example, it currently doesn't support pointers to many value types; this could easily be added for all value types, except it'd conflict...

This PR allows using rust-objc lib to target [tier 3 *-apple builds](https://doc.rust-lang.org/nightly/rustc/platform-support/apple-tvos.html): - Apple tvOS on aarch64 - Apple tvOS Simulator on x86_64

Hi, I am scanning the objc in the latest version with my own static analyzer tool. Unsafe conversion found at: src/runtime.rs#L506 ``` rust let ptr = { let self_ptr: *mut...

Based on https://github.com/rust-lang/rust/pull/121419

Using the `msg_send!` macro yields warnings like this with upcoming rustc 1.84.0: ``` error: unexpected `cfg` condition value: `cargo-clippy` --> /opt/worker/tasks/task_171225436694629/build/obj-build/x86_64-apple-darwin/debug/build/cocoabind-fb71164ed4d87a08/out/cocoa_bindings.rs:23030:9 | 23030 | msg_send!(class!(NSColor), whiteColor) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | =...