-
Notifications
You must be signed in to change notification settings - Fork 41
/
Cargo.toml
165 lines (122 loc) · 3.47 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
[lib]
path = "src/_lib.rs"
[package]
name = "safer-ffi"
version = "0.1.13" # Keep in sync
authors = ["Daniel Henry-Mantilla <[email protected]>"]
edition = "2021"
rust-version = "1.72.1"
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", "stabby?/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"]
serde = ["dep:serde"]
stabby = ["dep:stabby"]
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",
]
# Deprecated: now always enabled, and thus does nothing.
# TODO: remove in the next semver bump.
inventory-0-3-1 = []
internal-tests = [
"async-fn",
"headers",
"python-headers",
"dyn-traits",
"tokio/rt-multi-thread",
]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docs)'] }
[dev-dependencies]
safer-ffi.path = "."
safer-ffi.features = ["internal-tests"]
rand = "0.8.5"
serde_test = { version = "1.0.177" }
[dependencies]
async-compat.optional = true
async-compat.version = "0.2.1"
extern-c.version = "0.1.0"
futures.optional = true
futures.version = "0.3.24"
inventory.optional = true
inventory.version = "0.3.5"
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
serde.version = "1.0.171"
serde.optional = true
serde.default-features = false
stabby.version = "36.1.1"
stabby.optional = true
stabby.default-features = false
stabby.features = ["experimental-ctypes", "alloc-rs"]
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.13" # 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",
]
exclude = ["examples/point"]
[package.metadata.docs.rs]
features = ["docs"]
[[test]]
name = "ffi-tests"
path = "ffi_tests/src/lib.rs"