Registry / other / objc2-foundation

objc2-foundation

JSON →
library0.3.2rscratesunverified

Rust bindings to Apple's Foundation framework, providing access to NSString, NSArray, NSDictionary, and other core Objective-C types.

# Cargo.toml [dependencies] objc2-foundation = "0.3.2"
INSTALL
IMPORT
SIG · OBJC2-FOUNDATION
O
objc2-foundation
otherrustv0.3.2
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.

NSString
use objc2_foundation::NSString;

Creates an NSString from a Rust string and prints it.

use objc2_foundation::NSString; fn main() { let string = NSString::from_str("Hello, world!"); println!("{}", string); }
Debug
Known issues
gotchaRequires macOS or iOS target and the objc2 runtime; not available on other platforms.
fix
Use cfg(target_os = "macos") or cfg(target_os = "ios") to conditionally compile.
affects: >=0.3.0
Upgrade
Version history
0.3.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
objc2-foundation — cargo add objc2-foundation · libregistry