Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
147 lines (130 loc) · 4.71 KB
/
Copy pathCargo.toml
File metadata and controls
147 lines (130 loc) · 4.71 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
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
[package]
name = "phpantom_lsp"
version = "0.11.1"
edition = "2024"
license = "MIT"
description = "Fast PHP language server with deep type intelligence. Generics, Laravel, PHPStan annotations. Ready in an instant."
repository = "https://github.com/PHPantom-dev/phpantom_lsp"
documentation = "https://docs.rs/phpantom_lsp/latest/phpantom_lsp/"
readme = "README.md"
exclude = [".gitignore", ".github/*", "target/*"]
[dependencies]
clap = { version = "4.5", features = ["derive", "wrap_help"] }
tower-lsp-server = { version = "=0.24.0-rc.1", features = ["url-url"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sqlparser = "0.63"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# tokio is declared per-target below: "full" on native, a slim feature set on
# wasm (which has no sockets, so "net" would pull in mio and fail to build).
mago-syntax = "=1.58.2"
mago-allocator = "=1.58.2"
mago-database = "=1.58.2"
mago-names = "=1.58.2"
mago-phpdoc-syntax = "=1.58.2"
mago-span = "=1.58.2"
mago-formatter = { version = "=1.58.2", features = ["serde"] }
mago-php-version = "=1.58.2"
mago-composer = "=1.58.2"
ignore = "0.4"
globset = "0.4"
regex = "1"
memchr = "2"
memmap2 = "0.9"
ustr = "1"
parking_lot = "0.12"
tempfile = "3"
toml = "1"
etcetera = "0.11"
similar = { version = "3.2.0", default-features = false }
dunce = "1"
# musl's built-in malloc is very slow under the multi-threaded,
# allocation-heavy load of parallel indexing and parse workers (4-6x
# slower whole-project analysis), so the static musl binaries we ship
# for Linux use mimalloc instead.
#
# Scoped to Linux rather than musl alone so that a local `cargo build`
# on a glibc workstation gets the same allocator as the binaries we
# release: every Linux artifact we publish is musl, so no shipped build
# is affected by widening this, while performance and memory figures
# measured locally now match what users actually run. macOS and Windows
# release from their own targets and use the system allocator both in
# CI and locally, so they are already representative and are left alone.
[target.'cfg(target_os = "linux")'.dependencies]
mimalloc = { version = "0.1.47", optional = true }
libmimalloc-sys = { version = "0.1", optional = true, features = ["extended"] }
libc = { version = "0.2", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.39", features = ["full"] }
# `self_update` only: downloads a release archive and swaps the running binary.
# None of it applies to (or builds for) a wasm module.
ureq = "3"
tar = "0.4"
flate2 = "1"
self-replace = "1"
zip = { version = "9", default-features = false, features = ["deflate"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { version = "1.39", features = ["sync", "macros", "rt", "time"] }
[build-dependencies]
ureq = "3"
tar = "0.4"
flate2 = "1"
[features]
# mimalloc is the default allocator on every shipped platform (see the
# note on the target-specific dependency above). It is a feature so it
# can be toggled off for benchmarking or debugging without editing code.
default = ["mimalloc"]
mimalloc = ["dep:mimalloc", "dep:libmimalloc-sys", "dep:libc"]
# Deep-size accounting of the long-lived symbol stores, printed at the
# end of `analyze` when PHPANTOM_MEM_AUDIT is set. Off by default: it
# installs a counting global allocator that adds two atomics to every
# allocation, so it must never be enabled in a shipped build.
mem-audit = []
# Owned semantic records for non-LSP consumers. Kept out of default builds so
# the public surface and its code have zero cost for editor users.
semantic-export = []
# Prevent the build script from downloading phpstorm-stubs. Existing local
# stubs are still embedded; a build without them gets an empty stub index.
offline-stubs = []
# Download size is what matters in the browser, so the wasm module is built for
# size rather than speed. A separate profile keeps this away from the native
# release build, where `opt-level = "s"` would cost real analysis throughput.
#
# cargo rustc --lib --crate-type cdylib \
# --profile wasm-release --target wasm32-wasip1
[profile.wasm-release]
inherits = "release"
opt-level = "s"
lto = "thin"
strip = true
[dev-dependencies]
datatest-stable = "0.3"
criterion = { version = "0.8", features = ["html_reports"] }
[[test]]
name = "fixture_runner"
harness = false
[[test]]
name = "assert_type_runner"
harness = false
[[bench]]
name = "completion"
harness = false
[[bench]]
name = "references"
harness = false
[[bench]]
name = "laravel_completion"
harness = false
[[bench]]
name = "custom_builder"
harness = false
[[bench]]
name = "symfony_completion"
harness = false
[[bench]]
name = "yii_completion"
harness = false
[[bench]]
name = "wordpress_completion"
harness = false