forked from getditto/safer_ffi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
185 lines (147 loc) · 3.15 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[lib]
path = "src/_lib.rs"
[package]
name = "safer-ffi"
version = "0.1.2" # Keep in sync
authors = [
"Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>",
]
edition = "2021"
description = "Write safer FFI code in Rust without polluting it with unsafe code"
keywords = [
"ffi", "no_std", "framework", "safety", "bindings",
]
license = "MIT"
repository = "https://github.com/getditto/safer_ffi"
readme = "README.md"
exclude = [
"/guide",
]
[features]
default = [
"std",
]
# Document under the following features: all but for debug or experimental.
docs = [
"headers",
"default",
"nightly",
"tokio",
]
nightly = []
alloc = []
std = [
"alloc",
"scopeguard/use_std",
]
proc_macros = [] # Deprecated
async-fn = [
"safer_ffi-proc_macros/async-fn",
]
debug_proc_macros = [
"safer_ffi-proc_macros/verbose-expansions",
]
dyn-traits = [
"safer_ffi-proc_macros/dyn-traits",
# FIXME: make this finer-grained
"std",
]
futures = [
"dep:futures",
"dyn-traits",
]
tokio = [
"async-compat",
"dep:tokio",
"futures",
]
headers = [
"inventory",
"safer_ffi-proc_macros/headers",
"std",
]
python-headers = [
"headers",
]
# Tweak the generated `.h` ever so slightly.
c-headers-with-fn-style = [
"headers",
]
# PRIVATE FEATURE / not part of crates.io package!
js = [
"async-fn",
"dep:once_cell",
"headers",
"inventory",
"napi",
"safer_ffi-proc_macros/js",
# For convenience
"std",
]
inventory-0-3-1 = [
"dep:inventory-0-3-1",
"safer_ffi-proc_macros/inventory-0-3-1",
]
internal-tests = [
"async-fn",
"headers",
"python-headers",
"dyn-traits",
"tokio/rt-multi-thread",
]
[dev-dependencies]
safer-ffi.path = "."
safer-ffi.features = ["internal-tests"]
[dependencies]
async-compat.optional = true
async-compat.version = "0.2.1"
futures.optional = true
futures.version = "0.3.24"
inventory.optional = true
inventory.version = "0.1.6"
inventory-0-3-1.optional = true
inventory-0-3-1.package = "inventory"
inventory-0-3-1.version = "0.3.1"
libc.version = "0.2.66"
libc.default-features = false
log.optional = true
log.version = "0.4.8"
macro_rules_attribute.version = "0.1.3"
once_cell.optional = true
once_cell.version = "1.17.1"
paste.version = "1.0.12"
scopeguard.version = "1.1.0"
scopeguard.default-features = false
tokio.optional = true
tokio.version = "1.26.0"
tokio.features = [
"rt",
]
uninit.version = "0.5.0"
uninit.default-features = false
unwind_safe.version = "0.1.0"
with_builtin_macros.version = "0.0.3"
# This dependency is not released to crates.io
[dependencies.napi]
optional = true
path = "napi-dispatcher"
package = "cratesio-placeholder-package"
version = "0.0.3"
[dependencies.safer_ffi-proc_macros]
path = "src/proc_macro"
version = "=0.1.2" # Keep in sync
[workspace]
members = [
"src/proc_macro",
"napi-dispatcher",
"napi-dispatcher/nodejs-derive",
"napi-dispatcher/nodejs-derive/src/proc_macros",
"napi-dispatcher/wasm",
"napi-dispatcher/wasm/src/proc_macros",
"safer-ffi-build",
]
[package.metadata.docs.rs]
features = ["docs"]
[[test]]
name = "ffi-tests"
path = "ffi_tests/src/lib.rs"