[package]
name = "objc2"
version = "0.6.4"
description = "Objective-C interface and runtime bindings"
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "objc"]
categories = [
"external-ffi-bindings",
"api-bindings",
"development-tools::ffi",
"os::macos-apis",
]
license = "MIT"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
[lints]
workspace = true
[features]
default = ["std"]
std = ["alloc", "objc2-encode/std"]
alloc = ["objc2-encode/alloc"]
exception = ["dep:objc2-exception-helper"]
catch-all = ["exception"]
relax-void-encoding = []
relax-sign-encoding = []
disable-encoding-assertions = []
verify = []
unstable-static-sel = ["dep:objc2-proc-macros"]
unstable-static-sel-inlined = ["unstable-static-sel"]
unstable-static-class = ["dep:objc2-proc-macros"]
unstable-static-class-inlined = ["unstable-static-class"]
unstable-darwin-objc = []
unstable-autoreleasesafe = []
unstable-apple-new = []
unstable-arbitrary-self-types = []
unstable-coerce-pointee = []
gnustep-1-7 = ["unstable-static-class", "block2/gnustep-1-7", "objc2-exception-helper?/gnustep-1-7"]
gnustep-1-8 = ["gnustep-1-7", "block2/gnustep-1-8", "objc2-exception-helper?/gnustep-1-8"]
gnustep-1-9 = ["gnustep-1-8", "block2/gnustep-1-9", "objc2-exception-helper?/gnustep-1-9"]
gnustep-2-0 = ["gnustep-1-9", "block2/gnustep-2-0", "objc2-exception-helper?/gnustep-2-0"]
gnustep-2-1 = ["gnustep-2-0", "block2/gnustep-2-1", "objc2-exception-helper?/gnustep-2-1"]
unstable-compiler-rt = ["gnustep-1-7"]
unstable-gnustep-strict-apple-compat = ["gnustep-1-7"]
unstable-winobjc = ["gnustep-1-8"]
unstable-objfw = []
unstable-requires-macos = []
objc2-proc-macros = []
[dependencies]
objc2-encode = { path = "../objc2-encode", version = "4.1.0", default-features = false }
objc2-proc-macros = { path = "../objc2-proc-macros", version = "0.2.0", optional = true }
objc2-exception-helper = { path = "../objc2-exception-helper", version = "0.1.1", default-features = false, optional = true }
[dev-dependencies]
iai = { version = "0.1", git = "https://github.com/madsmtm/iai", branch = "callgrind" }
static_assertions = "1.1.0"
backtrace = "0.3.74"
memoffset = "0.9.0"
block2 = { path = "../block2" }
objc2-core-foundation = { path = "../../framework-crates/objc2-core-foundation", default-features = false, features = [
"CFCGTypes",
] }
objc2-foundation = { path = "../../framework-crates/objc2-foundation", default-features = false, features = [
"std",
"NSArray",
"NSArray",
"NSDate",
"NSDictionary",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSException",
"NSKeyValueObserving",
"NSNotification",
"NSNotification",
"NSNumberFormatter",
"NSObjCRuntime",
"NSObject",
"NSRunLoop",
"NSString",
"NSURL",
"NSValue",
"NSZone",
] }
libc = "0.2.158"
[target.'cfg(target_os = "macos")'.dev-dependencies]
objc2-app-kit = { path = "../../framework-crates/objc2-app-kit", default-features = false, features = [
"std",
"objc2-core-foundation",
"NSApplication",
"NSColor",
"NSControl",
"NSFont",
"NSGraphics",
"NSResponder",
"NSRunningApplication",
"NSText",
"NSTextField",
"NSView",
"NSWindow",
] }
[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dev-dependencies]
objc2-ui-kit = { path = "../../framework-crates/objc2-ui-kit", default-features = false, features = [
"UIApplication",
] }
[target.'cfg(target_vendor = "apple")'.dev-dependencies]
core-foundation = "0.10.0"
[[bench]]
name = "autorelease"
harness = false
[[example]]
name = "hello_world_app"
required-features = ["unstable-requires-macos"]
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["exception"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
[package.metadata.release]
shared-version = false
tag-prefix = "objc2"