/
Cargo.toml
136 lines (115 loc) · 4.17 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[package]
name = "objc2"
version = "0.5.1" # Remember to update html_root_url in lib.rs
authors = ["Steven Sheldon", "Mads Marquart <mads@marquart.dk>"]
edition = "2021"
rust-version = "1.60"
description = "Objective-C interface and runtime bindings"
keywords = ["objective-c", "macos", "ios", "objc_msgSend", "objc"]
categories = [
"api-bindings",
"development-tools::ffi",
"os::macos-apis",
]
readme = "README.md"
repository = "https://github.com/madsmtm/objc2"
documentation = "https://docs.rs/objc2/"
license = "MIT"
[lints]
workspace = true
# NOTE: 'unstable' features are _not_ considered part of the SemVer contract,
# and may be removed in a minor release.
[features]
default = ["std", "apple"]
# Currently not possible to turn off, put here for forwards compatibility.
std = ["alloc", "objc2-encode/std", "objc-sys/std"]
alloc = ["objc2-encode/alloc", "objc-sys/alloc"]
# Enables `objc2::exception::throw` and `objc2::exception::catch`
exception = ["objc-sys/unstable-exception"]
# Wrap every `objc2::msg_send` call in a `@try/@catch` block
catch-all = ["exception"]
# Allow `*const c_void` and `*mut c_void` to be used as arguments and return
# types where other pointers were expected.
#
# This may be useful for CoreFoundation types, or for migrating code from objc
# to objc2.
relax-void-encoding = []
# Enable deprecation of using `msg_send!` without a comma between arguments.
unstable-msg-send-always-comma = []
# This was necessary to access certain functionality in the past, but it is no
# longer required.
malloc = ["malloc_buf"]
# This was necessary to enable certain debug assertions in the past, but it is
# no longer required.
verify = []
# Make the `sel!` macro look up the selector statically.
#
# The plan is to enable this by default, but right now we are uncertain of
# its stability, and it might need significant changes before being fully
# ready!
#
# Please test it, and report any issues you may find:
# https://github.com/madsmtm/objc2/issues/new
unstable-static-sel = ["objc2-proc-macros"]
unstable-static-sel-inlined = ["unstable-static-sel"]
unstable-static-class = ["objc2-proc-macros"]
unstable-static-class-inlined = ["unstable-static-class"]
# Uses nightly features to make autorelease pools fully sound
unstable-autoreleasesafe = []
# Uses the nightly c_unwind feature to make throwing safe
#
# You must manually enable `objc-sys/unstable-c-unwind` to use this.
unstable-c-unwind = []
# For better documentation on docs.rs
unstable-docsrs = []
# Enable some new features available on ARM64 on:
# - macOS 13.0
# - iOS 16.0
# - tvOS 16.0
# - watchOS 9.0
#
# See https://developer.apple.com/videos/play/wwdc2022/110363/ for an overview
# of the features.
#
# Currently untested, might be unsound or lead to confusing compiler errors.
#
# Additionally, the message sending improvements is not yet implemented.
unstable-apple-new = ["apple"]
# Runtime selection. See `objc-sys` for details.
apple = ["objc-sys/apple"]
gnustep-1-7 = ["objc-sys/gnustep-1-7"]
gnustep-1-8 = ["gnustep-1-7", "objc-sys/gnustep-1-8"]
gnustep-1-9 = ["gnustep-1-8", "objc-sys/gnustep-1-9"]
gnustep-2-0 = ["gnustep-1-9", "objc-sys/gnustep-2-0"]
gnustep-2-1 = ["gnustep-2-0", "objc-sys/gnustep-2-1"]
# Used by `block2`
unstable-compiler-rt = ["apple"]
[dependencies]
malloc_buf = { version = "1.0", optional = true }
objc-sys = { path = "../objc-sys", version = "0.3.3", default-features = false }
objc2-encode = { path = "../objc2-encode", version = "4.0.1", default-features = false }
objc2-proc-macros = { path = "../objc2-proc-macros", version = "0.1.1", optional = true }
[dev-dependencies]
iai = { version = "0.1", git = "https://github.com/madsmtm/iai", branch = "callgrind" }
static_assertions = "1.1.0"
memoffset = "0.9.0"
[[bench]]
name = "autorelease"
harness = false
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
features = ["exception", "unstable-docsrs"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
[package.metadata.release]
shared-version = false
tag-prefix = "objc"