-
-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathCargo.toml
More file actions
323 lines (298 loc) · 10.8 KB
/
Cargo.toml
File metadata and controls
323 lines (298 loc) · 10.8 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
[workspace]
resolver = "2"
members = [
"crates/perry",
"crates/perry-parser",
"crates/perry-types",
"crates/perry-api-manifest",
"crates/perry-hir",
"crates/perry-transform",
"crates/perry-codegen",
"crates/perry-dispatch",
"crates/perry-runtime",
"crates/perry-ffi",
"crates/perry-ext-dotenv",
"crates/perry-ext-nanoid",
"crates/perry-ext-uuid",
"crates/perry-ext-slugify",
"crates/perry-ext-bcrypt",
"crates/perry-ext-argon2",
"crates/perry-ext-jsonwebtoken",
"crates/perry-ext-validator",
"crates/perry-ext-lru-cache",
"crates/perry-ext-better-sqlite3",
"crates/perry-ext-zlib",
"crates/perry-ext-exponential-backoff",
"crates/perry-ext-axios",
"crates/perry-ext-events",
"crates/perry-ext-decimal",
"crates/perry-ext-dayjs",
"crates/perry-ext-moment",
"crates/perry-ext-cheerio",
"crates/perry-ext-sharp",
"crates/perry-ext-ratelimit",
"crates/perry-ext-commander",
"crates/perry-ext-ethers",
"crates/perry-ext-nodemailer",
"crates/perry-ext-cron",
"crates/perry-ext-ioredis",
"crates/perry-ext-pg",
"crates/perry-ext-mysql2",
"crates/perry-ext-fetch",
"crates/perry-ext-mongodb",
"crates/perry-ext-ws",
"crates/perry-ext-net",
"crates/perry-ext-http",
"crates/perry-ext-streams",
"crates/perry-ext-fastify",
"crates/perry-ext-pdf",
"crates/perry-ext-ads",
"crates/perry-wasm-host",
"crates/perry-stdlib",
"crates/perry-diagnostics",
"crates/perry-ui",
"crates/perry-ui-model",
"crates/perry-ui-macos",
"crates/perry-ui-ios",
"crates/perry-ui-visionos",
"crates/perry-ui-android",
"crates/perry-audio-miniaudio",
"crates/perry-ui-gtk4",
"crates/perry-ui-windows",
"crates/perry-ui-watchos",
"crates/perry-ui-tvos",
"crates/perry-ui-geisterhand",
"crates/perry-codegen-js",
"crates/perry-codegen-swiftui",
"crates/perry-codegen-arkts",
"crates/perry-codegen-glance",
"crates/perry-codegen-wear-tiles",
"crates/perry-codegen-wasm",
"crates/perry-ui-test",
"crates/perry-ui-testkit",
"crates/perry-doc-tests",
"crates/perry-updater",
"docs/examples/_fixtures/native-libraries/my-bindings",
]
# Only build platform-independent crates by default.
# Platform-specific UI crates (perry-ui-macos, perry-ui-ios, etc.) must be built
# explicitly with -p on their target platform.
default-members = [
"crates/perry",
"crates/perry-parser",
"crates/perry-types",
"crates/perry-api-manifest",
"crates/perry-hir",
"crates/perry-transform",
"crates/perry-codegen",
"crates/perry-dispatch",
"crates/perry-runtime",
"crates/perry-ffi",
"crates/perry-ext-dotenv",
"crates/perry-ext-nanoid",
"crates/perry-ext-uuid",
"crates/perry-ext-slugify",
"crates/perry-ext-bcrypt",
"crates/perry-ext-argon2",
"crates/perry-ext-jsonwebtoken",
"crates/perry-ext-validator",
"crates/perry-ext-lru-cache",
"crates/perry-ext-better-sqlite3",
"crates/perry-ext-zlib",
"crates/perry-ext-exponential-backoff",
"crates/perry-ext-axios",
"crates/perry-ext-events",
"crates/perry-ext-decimal",
"crates/perry-ext-dayjs",
"crates/perry-ext-moment",
"crates/perry-ext-cheerio",
"crates/perry-ext-sharp",
"crates/perry-ext-ratelimit",
"crates/perry-ext-commander",
"crates/perry-ext-ethers",
"crates/perry-ext-nodemailer",
"crates/perry-ext-cron",
"crates/perry-ext-ioredis",
"crates/perry-ext-pg",
"crates/perry-ext-mysql2",
"crates/perry-ext-fetch",
"crates/perry-ext-mongodb",
"crates/perry-ext-ws",
"crates/perry-ext-net",
"crates/perry-ext-http",
"crates/perry-ext-streams",
"crates/perry-ext-fastify",
"crates/perry-ext-pdf",
"crates/perry-ext-ads",
"crates/perry-wasm-host",
"crates/perry-stdlib",
"crates/perry-diagnostics",
"crates/perry-ui",
"crates/perry-codegen-js",
"crates/perry-codegen-swiftui",
"crates/perry-codegen-arkts",
"crates/perry-codegen-glance",
"crates/perry-codegen-wear-tiles",
"crates/perry-codegen-wasm",
"crates/perry-updater",
]
# Aggressive release optimizations for small, fast binaries
[profile.release]
lto = "thin" # Thin LTO for faster builds and fewer duplicate symbols
codegen-units = 1 # Better optimization, slower compile
panic = "unwind" # Allow catch_unwind for graceful error recovery
strip = true # Strip symbols automatically
opt-level = 3 # Maximum optimization
# For the runtime/stdlib static libraries
[profile.release.package.perry-runtime]
opt-level = 3
strip = false
# UI crates must NOT strip — they export #[no_mangle] extern "C" symbols
[profile.release.package.perry-ui-macos]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-gtk4]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-windows]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-geisterhand]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-ios]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-visionos]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-tvos]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-android]
strip = false
codegen-units = 16
[profile.release.package.perry-ui-watchos]
strip = false
codegen-units = 16
[profile.release.package.perry-stdlib]
opt-level = "s" # Optimize for size in stdlib
[workspace.package]
version = "0.5.1055"
edition = "2021"
license = "MIT"
repository = "https://github.com/PerryTS/perry"
[workspace.dependencies]
# SWC for TypeScript parsing
swc_ecma_parser = "32.0"
swc_ecma_ast = "19.0"
swc_common = "18.0"
# Runtime dependencies
# bdwgc for garbage collection (Boehm GC)
# We'll use libgc-sys or similar
# Utilities
thiserror = "1.0"
anyhow = "1.0"
log = "0.4"
env_logger = "0.10"
clap = { version = "4.5", features = ["derive"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "1.1"
# JWT — jsonwebtoken 10.x requires explicitly selecting a crypto backend
# (`rust_crypto` or `aws_lc_rs`) and opting into PEM parsing for
# `from_ec_pem` / `from_rsa_pem`. `rust_crypto` keeps the deps tree small
# relative to `aws_lc_rs`; users who need FIPS validation can fork.
jsonwebtoken = { version = "10.4", default-features = false, features = ["rust_crypto", "use_pem"] }
# Terminal UI
indicatif = "0.17"
console = "0.16"
dialoguer = "0.12"
# File system
walkdir = "2.4"
notify = "6.1"
# Diff generation
similar = "2.4"
# HTTP / WebSocket (for publish command)
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json", "multipart", "blocking"] }
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
futures-util = "0.3"
url = "2"
dirs = "6"
# .env file loading (for publish command)
dotenvy = "0.15"
# Archive creation (for publish command)
flate2 = "1"
tar = "0.4"
base64 = "0.22"
zip = "2"
# Internal crates
perry-parser = { path = "crates/perry-parser" }
perry-types = { path = "crates/perry-types" }
perry-api-manifest = { path = "crates/perry-api-manifest" }
perry-hir = { path = "crates/perry-hir" }
perry-transform = { path = "crates/perry-transform" }
perry-codegen = { path = "crates/perry-codegen" }
perry-dispatch = { path = "crates/perry-dispatch" }
# #1112: `perry-ffi` is published to crates.io so npm-packaged native
# wrappers (per `perry.nativeLibrary` in package.json) can resolve it
# without a sibling Perry checkout. perry-ffi's only direct reference
# to perry-runtime is a `#[cfg(test)]` layout-assertion test which
# moves perry-runtime to a path-only `[dev-dependencies]` entry —
# `cargo publish -p perry-ffi` therefore strips it from the published
# Cargo.toml, and external users never need perry-runtime in their
# Cargo graph (Perry's compiler driver links `libperry_runtime.a`
# into the final binary directly).
perry-runtime = { path = "crates/perry-runtime", version = "0.5.1011" }
perry-ffi = { path = "crates/perry-ffi", version = "0.5.1011" }
perry-ext-dotenv = { path = "crates/perry-ext-dotenv" }
perry-ext-nanoid = { path = "crates/perry-ext-nanoid" }
perry-ext-uuid = { path = "crates/perry-ext-uuid" }
perry-ext-slugify = { path = "crates/perry-ext-slugify" }
perry-ext-bcrypt = { path = "crates/perry-ext-bcrypt" }
perry-ext-argon2 = { path = "crates/perry-ext-argon2" }
perry-ext-jsonwebtoken = { path = "crates/perry-ext-jsonwebtoken" }
perry-ext-validator = { path = "crates/perry-ext-validator" }
perry-ext-lru-cache = { path = "crates/perry-ext-lru-cache" }
perry-ext-better-sqlite3 = { path = "crates/perry-ext-better-sqlite3" }
perry-ext-zlib = { path = "crates/perry-ext-zlib" }
perry-ext-exponential-backoff = { path = "crates/perry-ext-exponential-backoff" }
perry-ext-axios = { path = "crates/perry-ext-axios" }
perry-ext-events = { path = "crates/perry-ext-events" }
perry-ext-decimal = { path = "crates/perry-ext-decimal" }
perry-ext-dayjs = { path = "crates/perry-ext-dayjs" }
perry-ext-moment = { path = "crates/perry-ext-moment" }
perry-ext-cheerio = { path = "crates/perry-ext-cheerio" }
perry-ext-sharp = { path = "crates/perry-ext-sharp" }
perry-ext-ratelimit = { path = "crates/perry-ext-ratelimit" }
perry-ext-commander = { path = "crates/perry-ext-commander" }
perry-ext-ethers = { path = "crates/perry-ext-ethers" }
perry-ext-nodemailer = { path = "crates/perry-ext-nodemailer" }
perry-ext-cron = { path = "crates/perry-ext-cron" }
perry-ext-ioredis = { path = "crates/perry-ext-ioredis" }
perry-ext-pg = { path = "crates/perry-ext-pg" }
perry-ext-mysql2 = { path = "crates/perry-ext-mysql2" }
perry-ext-fetch = { path = "crates/perry-ext-fetch" }
perry-ext-mongodb = { path = "crates/perry-ext-mongodb" }
perry-ext-ws = { path = "crates/perry-ext-ws" }
perry-ext-net = { path = "crates/perry-ext-net" }
perry-ext-http = { path = "crates/perry-ext-http" }
perry-ext-streams = { path = "crates/perry-ext-streams" }
perry-ext-fastify = { path = "crates/perry-ext-fastify" }
perry-ext-pdf = { path = "crates/perry-ext-pdf" }
perry-ext-ads = { path = "crates/perry-ext-ads" }
perry-stdlib = { path = "crates/perry-stdlib" }
perry-diagnostics = { path = "crates/perry-diagnostics" }
perry-ui-model = { path = "crates/perry-ui-model" }
perry-wasm-host = { path = "crates/perry-wasm-host" }
perry-codegen-js = { path = "crates/perry-codegen-js" }
perry-codegen-swiftui = { path = "crates/perry-codegen-swiftui" }
perry-codegen-arkts = { path = "crates/perry-codegen-arkts" }
perry-codegen-glance = { path = "crates/perry-codegen-glance" }
perry-codegen-wear-tiles = { path = "crates/perry-codegen-wear-tiles" }
perry-codegen-wasm = { path = "crates/perry-codegen-wasm" }
perry-ui-testkit = { path = "crates/perry-ui-testkit" }
perry-audio-miniaudio = { path = "crates/perry-audio-miniaudio" }
perry-updater = { path = "crates/perry-updater" }