Registry / other / objc2
library0.6.4rscratesunverified

Provides Objective-C interface and runtime bindings for Rust, enabling interaction with Objective-C objects.

# Cargo.toml [dependencies] objc2 = "0.6.4"
INSTALL
IMPORT
SIG · OBJC2
O
objc2
otherrustv0.6.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

msg_send!
use objc2::msg_send!;

Sends a retain message to an NSObject using msg_send!.

use objc2::msg_send; use objc2::runtime::NSObject; fn main() { let obj = NSObject::new(); let _: () = unsafe { msg_send![obj, retain] }; println!("Retained object"); }
Debug
Known issues
gotchaAll msg_send! calls are unsafe and require careful handling of memory and type safety.
fix
Ensure proper use of unsafe blocks and verify Objective-C method signatures.
affects: >=0.6.0
Upgrade
Version history
0.6.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
objc2 — cargo add objc2 · libregistry