[package] name = "block2" version = "0.6.2" # Remember to update html_root_url in lib.rs description = "Apple's C language extension of blocks" keywords = ["objective-c", "macos", "ios", "blocks"] categories = [ "api-bindings", "development-tools::ffi", "os::macos-apis", "external-ffi-bindings", ] authors.workspace = true edition.workspace = true rust-version.workspace = true repository.workspace = true # https://github.com/madsmtm/objc2/issues/23 # All future contributions are licensed under "Zlib OR Apache-2.0 OR MIT". license = "MIT" [lints] workspace = true [features] default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. std = ["alloc"] alloc = [] # Link to libBlocksRuntime from compiler-rt. compiler-rt = ["objc2/unstable-compiler-rt"] # TODO: fix this # Link to GNUStep's libobjc2 (which contains the block implementation). gnustep-1-7 = ["objc2/gnustep-1-7"] gnustep-1-8 = ["gnustep-1-7", "objc2/gnustep-1-8"] gnustep-1-9 = ["gnustep-1-8", "objc2/gnustep-1-9"] gnustep-2-0 = ["gnustep-1-9", "objc2/gnustep-2-0"] gnustep-2-1 = ["gnustep-2-0", "objc2/gnustep-2-1"] # Link to Microsoft's libobjc2. unstable-winobjc = ["gnustep-1-8"] # Link to ObjFW. unstable-objfw = [] # Expose private ffi functions and statics. unstable-private = [] # Uses the nightly derive_coerce_pointee feature to make conversions more ergonomic. unstable-coerce-pointee = [] [dependencies] objc2 = { workspace = true, features = ["std"] } [dev-dependencies] objc2-foundation = { path = "../../framework-crates/objc2-foundation", default-features = false, features = [ "std", "NSError", ] } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" rustc-args = ["--cfg", "docsrs"] # Fix cross-crate link to objc2::topics features = ["unstable-private"] 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 = "block2"