-
-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathCargo.toml
More file actions
89 lines (76 loc) · 2.24 KB
/
Cargo.toml
File metadata and controls
89 lines (76 loc) · 2.24 KB
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
[package]
name = "ext-php-rs"
description = "Bindings for the Zend API to build PHP extensions natively in Rust."
repository = "https://github.com/extphprs/ext-php-rs"
homepage = "https://ext-php.rs"
license = "MIT OR Apache-2.0"
keywords = ["php", "ffi", "zend"]
version = "0.15.3"
authors = [
"Pierre Tondereau <pierre.tondereau@protonmail.com>",
"Xenira <xenira@php.rs>",
"David Cole <david.cole1340@gmail.com>",
]
edition = "2024"
categories = ["api-bindings"]
exclude = ["/.github", "/.crates"]
autotests = false
[dependencies]
bitflags = "2"
parking_lot = { version = "0.12.3", features = ["arc_lock"] }
cfg-if = "1.0"
once_cell = "1.21"
anyhow = { version = "1", optional = true }
inventory = "0.3"
ext-php-rs-derive = { version = "=0.11.6", path = "./crates/macros" }
[dev-dependencies]
skeptic = "0.13"
[build-dependencies]
anyhow = "1"
bindgen = { version = "0.72", default-features = false, features = [
"logging",
"prettyplease",
] }
cc = "1.2"
skeptic = "0.13"
[target.'cfg(windows)'.build-dependencies]
ureq = { version = "3.0", features = [
"native-tls",
"gzip",
], default-features = false }
native-tls = "0.2"
zip = "7.0"
[features]
default = ["enum", "runtime"]
closure = []
embed = []
anyhow = ["dep:anyhow"]
enum = []
runtime = ["bindgen/runtime"]
static = ["bindgen/static"]
[workspace]
members = ["crates/macros", "crates/cli", "tests"]
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docs"]
[lints.rust]
missing_docs = "warn"
[[example]]
name = "hello_world"
crate-type = ["cdylib"]
[[test]]
name = "guide_tests"
path = "tests/guide.rs"
required-features = ["embed", "closure", "anyhow"]
[[test]]
name = "module_tests"
path = "tests/module.rs"
[[test]]
name = "sapi_tests"
path = "tests/sapi.rs"
# Patch clang-sys and bindgen for preserve_none calling convention support (libclang 19/20)
# Required for PHP 8.5+ on macOS ARM64 which uses TAILCALL VM mode
# - clang-sys: Adds libclang 19/20 bindings (https://github.com/KyleMayes/clang-sys/pull/195)
# - bindgen: Maps CXCallingConv_PreserveNone to C ABI
[patch.crates-io]
clang-sys = { git = "https://github.com/extphprs/clang-sys.git", branch = "preserve-none-support" }
bindgen = { git = "https://github.com/extphprs/rust-bindgen.git", branch = "preserve-none-support" }