objc2 0.3.0-beta.4

Objective-C interface and bindings to the Cocoa Foundation framework
docs.rs failed to build objc2-0.3.0-beta.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: objc2-0.5.1

objc2

Latest version License Documentation CI

Objective-C interface and bindings to the Foundation framework in Rust.

Most of the core libraries and frameworks that are in use on Apple systems are written in Objective-C; this crate enables you to interract with those, and provides ready-made bindings for the Foundation framework in particular.

Example

use objc2::{msg_send, msg_send_id, ClassType};
use objc2::ffi::NSUInteger;
use objc2::rc::{Id, Owned};
use objc2::runtime::NSObject;

let obj: Id<NSObject, Owned> = unsafe { msg_send_id![NSObject::class(), new] };

let hash: NSUInteger = unsafe { msg_send![&obj, hash] };
println!("NSObject hash: {}", hash);

See the docs for a more thorough overview, or jump right into the examples.

This crate is part of the objc2 project, see that for related crates.