Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
641 lines (582 loc) · 26.6 KB
/
Copy pathCargo.toml
File metadata and controls
641 lines (582 loc) · 26.6 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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
[workspace]
members = [
"crates/soli-ai",
"crates/soli-cdp",
"crates/soli-cloud",
"crates/soli-core",
"crates/soli-coverage",
"crates/soli-crypto",
"crates/soli-ctx",
"crates/soli-db",
"crates/soli-fmt",
"crates/soli-graph",
"crates/soli-lint",
"crates/soli-metrics",
"crates/soli-module",
"crates/soli-native",
"crates/soli-platform",
"crates/soli-solidb",
"crates/soli-stdlib",
"crates/soli-syntax",
"crates/soli-template-parser",
"crates/soli-types",
"crates/soli-xml",
"yaml",
"pdf",
"codegraph",
]
exclude = ["edge", "fuzz"]
[package]
name = "solilang"
version = "2.44.1"
edition = "2021"
publish = false
default-run = "soli"
description = "A dynamically-typed, class-based OOP language with optional type annotations and pipeline operators"
authors = ["Solilang Team"]
license = "MIT"
repository = "https://github.com/solisoft/soli_lang"
# Exclude the docs-website runtime from the published crate, but keep
# www/docs/*.md so the scaffolder can bundle them into every new app.
exclude = [
"www/.claude",
"www/.env",
"www/CLAUDE.md",
"www/README.md",
"www/app",
"www/app.infos",
"www/config",
"www/db",
"www/node_modules",
"www/package-lock.json",
"www/package.json",
"www/public",
"www/soli.toml",
"www/stdlib",
"www/tailwind.config.js",
"www/tests",
]
[[bin]]
name = "soli"
path = "src/main.rs"
[features]
# Full product build: SoliDB always-on; optional subsystems on by default so
# `cargo install` / CI match published binaries. Drop with
# `--no-default-features --features …` for a slimmer binary / lower RSS.
default = [
"embedding",
"llm",
"codegraph",
"paseto",
"postgres",
"mysql",
"sqlite",
"ssh",
"office",
"pdf",
"cloud",
"lsp",
"mail",
"eui",
"solidb-driver",
"native",
"es",
]
# Kitchen-sink alias (default set; the native SoliDB driver is now part of it).
full = [
"embedding",
"llm",
"codegraph",
"paseto",
"postgres",
"mysql",
"sqlite",
"ssh",
"office",
"pdf",
"cloud",
"lsp",
"mail",
"eui",
"solidb-driver",
"native",
"es",
]
embedding = ["soli-ai/embedding", "soli-graph/embedding"]
# LLM text completion via an OpenAI-compatible chat/completions endpoint
# (crates/soli-ai/src/generation.rs, exposed to Soli as the `llm_generate` builtin).
llm = ["soli-ai/llm"]
# Multi-language code-graph extraction (`soli graph build` on non-Soli repos).
# Pulls tree-sitter + grammar crates (compiled C, ~+8-10MB). On by default so a
# normal install works out of the box; drop it (`--no-default-features` set) for
# a lean standalone runtime that never indexes foreign codebases.
codegraph = ["soli-graph/codegraph"]
# Native SoliDB driver transport for the model layer (src/solidb_driver.rs),
# switched on at runtime with SOLI_DB_DRIVER=1. In the default set: it used to
# be off because `solidb-client` was a path dependency on a sibling checkout,
# but it is a git dependency now, so release binaries, the Docker image and
# `cargo install` all carry it. Without it SOLI_DB_DRIVER=1 did nothing.
solidb-driver = ["soli-solidb/solidb-driver"]
# PASETO v4 builtins (`Paseto` class). Omit to drop `pasetors` from the link.
paseto = ["soli-crypto/paseto", "soli-types/paseto"]
# SQL document adapters (Model when SOLI_DB_ADAPTER / database.toml selects them).
# Pooled by src/db/pool.rs, not r2d2: r2d2 validated every checkout (and
# r2d2_mysql every check-in), one or two extra round trips per query.
postgres = ["soli-db/postgres", "dep:postgres"]
mysql = ["soli-db/mysql"]
# SQLite document adapter. Bundled: no system libsqlite3 needed, and it pins a
# SQLite new enough for the `->>` JSON operator (3.38+) and RETURNING (3.35+).
sqlite = ["soli-db/sqlite", "dep:rusqlite"]
# Every SQL backend.
sql = ["postgres", "mysql", "sqlite"]
# `soli deploy`: rsync and commands over the system `ssh` (src/module/
# deploy.rs). It needs no crate of its own any more — it used `ssh2`, which
# compiled OpenSSL from source — and stays a feature so a build can still
# leave the command out. Unix-only either way.
ssh = ["soli-module/ssh"]
# `Spreadsheet` — reading and writing xlsx and csv: calamine reads, an
# in-tree writer writes (it replaced `umya-spreadsheet`, a megabyte of code
# and a dozen crates), `csv` does csv.
office = ["dep:calamine", "dep:zip", "dep:csv"]
# `Pdf` — rendering, Factur-X, and PAdES signatures. The `soli-pdf` crate
# beside this one brings printpdf, lopdf and a full SVG stack; the
# signature half brings CMS and X.509.
pdf = ["dep:soli-pdf", "dep:cms"]
# `S3` and the S3 attachment service, on the in-tree Signature V4 client
# (src/interpreter/builtins/s3_client.rs). It needs no crate of its own;
# disk attachments do not need it at all.
cloud = []
# `soli lsp` — the language server an editor talks to. A packaged
# application never starts one.
lsp = ["dep:tower-lsp-server"]
# `Mailer`, `Imap` and `Pop3` — composing, sending and reading mail.
# Without it the mailer prelude is empty and the three classes are absent.
mail = ["dep:mail-builder", "dep:mail-parser"]
eui = ["dep:eui-proto", "dep:wasmtime", "dep:blake3", "soli-types/eui"]
# Native typed kernels: a top-level function typed Int/Float/Bool end to end
# that only does arithmetic, comparisons, branches and loops is compiled to
# machine code with Cranelift when a script loads (src/native/). Off, every
# function runs on the interpreter or the VM as before.
native = ["soli-native/native"]
# `ES`, the driver for es (github.com/solisoft/event_stream): produce and
# consume over its binary protocol, topics and consumer groups over HTTP.
es = ["dep:es-client", "soli-types/es"]
# The EUI window inside the soli binary, for `soli desktop build --eui`:
# winit, wgpu and the client crates. Servers do not need it.
eui-desktop = ["eui", "dep:eui-client"]
[dependencies]
thiserror = "1.0"
dirs = "5.0"
# Embed www/docs/*.md into the binary so `soli new` can copy them
# into every scaffolded app under docs/.
include_dir = "0.7"
# Memory allocator - much better RSS behavior than glibc for multi-threaded apps.
#
# `no_thp`: mimalloc otherwise `madvise(MADV_HUGEPAGE)`s every arena it commits,
# so each fresh region of a booting worker faults in 2 MiB pages, zeroed and —
# when free memory is fragmented — compacted synchronously, on every thread at
# once. On a 16-worker app that was most of the boot: measured on grc, first
# response 400–650 ms → ~200 ms and boot CPU ~4 s → ~0.7 s, with steady-state
# throughput unchanged (fresh app ~195k req/s either way) and RSS 10–35% lower.
# Decimal type for financial calculations
rust_decimal = { version = "1.34", features = ["std", "serde"] }
# The REPL's screen handling and the test runner's progress line. (There
# was a `ratatui` here; nothing in the tree ever used it.)
# HTTP support
# "http2" is required by APNs, which is HTTP/2-only — Apple's gateway refuses
# an HTTP/1.1 connection outright. Existing HTTP/1.1 callers are unaffected:
# the protocol is negotiated per-connection over ALPN.
reqwest = { version = "0.12", features = ["json", "multipart", "stream"], default-features = false }
serde = { version = "1.0", features = ["derive"] }
# float_roundtrip: a float read back is the float written, to the last bit —
# the engraver's coordinates cross from its WebAssembly module as JSON
# (serve::eui::engraver), and JSON.parse reads numbers exactly too.
serde_json = { version = "1.0", features = ["float_roundtrip"] }
# `Instant`/`SystemTime` that work on wasm32 too (std's panic there); a plain
# re-export of std everywhere else.
web-time = "1"
itoa = "1"
ryu = "1"
# SIMD/memchr string scanning for the hand-rolled JSON parser.
memchr = "2"
# High-performance async HTTP server. `server-auto` on hyper-util pulls in
# http2 so the same accept loop can auto-detect h1 vs h2c from the first
# bytes (HTTP/2 prior knowledge) — no separate port, no separate config.
hyper = { version = "1.4", features = ["server", "http1", "http2"] }
http-body-util = "0.1"
# "signal" powers the graceful-drain listener in `serve::spawn_drain_on_signal`.
tokio = { version = "1", features = ["sync", "macros", "rt", "time", "io-util"] }
tokio-stream = "0.1"
tokio-tungstenite = { version = "0.24", default-features = false, features = ["handshake"] }
bytes = "1.11.1"
uuid = { version = "1", features = ["v4", "v7", "serde"] }
tungstenite = "0.24"
lru = "0.18"
futures-util = "0.3"
crossbeam-channel = "0.5"
# Cryptography
argon2 = { version = "0.5", features = ["std", "rand"] }
curve25519-dalek = "5.1"
rand_core = "0.6"
sha2 = "0.10"
md-5 = "0.10"
hmac = "0.12"
sha1 = "0.10"
# PASETO v4 tokens (the `Paseto` builtin). Only `v4` is enabled: v1/v2 are
# deprecated and v3 exists for NIST-algorithm shops, which would pull p384 for
# a profile we don't expose. `paserk` gives us the `k4.local.` / `k4.public.`
# key serialization format, so keys are self-describing strings rather than
# bare bytes a caller could feed to the wrong purpose.
# Gated by feature `paseto` (on by default).
# Arbitrary-precision integers for RSA-style modular exponentiation
# (Crypto.modexp). Pairs with the PKCS#1 v1.5 padding helpers and
# exclusive XML C14N to build XML-DSig / WS-Security signing in Soli.
num-bigint = "0.4"
# X.509 certificates (X509.public_key / info / spki_pin, PAdES) are read with
# `x509-cert` (below) on the RustCrypto `der` stack already here for keys.
# They replaced `x509-parser` and the second ASN.1 stack it brought (nom 7,
# asn1-rs, der-parser); the port printed the same subject, issuer, serial,
# dates, SAN names, key and pin for all 146 certificates of a system CA bundle.
# RSA private-key (PKCS#8 / PKCS#1 PEM) parsing for RsaKey.private_from_pem —
# extracts (n, d, e) so an SP can *sign* envelopes via Crypto.modexp. We use the
# lightweight RustCrypto ASN.1 crates (der 0.7, as x509-cert and cms use) rather than the
# `rsa` crate, which carries the unfixable Marvin-attack advisory RUSTSEC-2023-0071
# — we only parse key material, never run rsa's timing-sensitive sign/decrypt.
der = "0.7"
pkcs1 = "0.7"
pkcs8 = "0.10"
# Data encoding
base64 = "0.22"
rmp-serde = "1"
# SoliDB client lives in crates/soli-solidb (feature "solidb-driver").
encoding_rs = "0.8"
# Validation
regex = "1"
chrono = { version = "0.4", features = ["std", "clock"] }
# Local-timezone conversions. chrono's `Local` re-resolves the system zone on
# every call (~47ns); a cached `chrono_tz::Tz` does the same work in ~20ns and
# is 10x faster on the `from_local_datetime` path. See
# `interpreter::builtins::datetime::local_zone`.
chrono-tz = "0.10"
iana-time-zone = "0.1"
# Request body parsing
multer = "3"
# QR codes on `/__soli/mobile` (also used by the `pdf` crate).
qrcode = { version = "0.14", default-features = false }
# JWT support
jsonwebtoken = "9"
# VAPID / Web Push (RFC 8291 / 8292): P-256 ECDH+ECDSA, HKDF, AES-128-GCM.
p256 = { version = "0.14", features = ["ecdh", "ecdsa", "pkcs8"] }
hkdf = "0.12"
aes-gcm = "0.10"
# LiveView support
async-channel = "2.3"
# Used for Unix-only `O_NOFOLLOW` open flag in the file builtins (SEC-006a).
# Already a transitive dep via tokio/etc; promoting it to a direct dep so the
# constant is reachable without depending on a specific transitive's exports.
libc = "0.2"
# Ordered hash map with O(1) lookups
indexmap = "2"
# Fast, non-cryptographic hasher for IndexMap (3-5x faster than SipHash)
ahash = "0.8"
# Cheap-clone string for Value::String: <=15 bytes inline (no heap alloc),
# longer strings Arc-backed with O(1) clone. Send+Sync.
ecow = { version = "0.2", features = ["serde"] }
# File watching for hot reload
# Test framework
walkdir = "2"
# YAML (locale files, `Yaml.parse` / `Yaml.stringify`): our own reader for
# the subset Soli uses, in safe Rust (yaml/). serde_yaml was deprecated and its
# parser, unsafe-libyaml, unmaintained (RUSTSEC-2024-0449).
soli-yaml = { path = "yaml" }
rand = "0.8"
soli-native = { path = "crates/soli-native" }
glob = "0.3"
urlencoding = "2"
url = "2"
# OpenAI-compatible embedding and LLM text completion clients.
soli-ai = { path = "crates/soli-ai" }
# Chrome DevTools Protocol headless-browser driver.
soli-cdp = { path = "crates/soli-cdp" }
# Blue/green release planning and proxy client for `soli deploy`.
soli-cloud = { path = "crates/soli-cloud" }
# Core runtime types (Value, Environment, RuntimeError, Bytecode IR, Debug/Profiler).
soli-core = { path = "crates/soli-core" }
# Line coverage tracking and HTML/LCOV/JSON reporting.
soli-coverage = { path = "crates/soli-coverage" }
# Request-scoped thread-locals and per-application tenant isolation.
soli-ctx = { path = "crates/soli-ctx" }
# Database adapters, connection pool, SQL compiler, DDL and tenancy.
soli-db = { path = "crates/soli-db" }
# Canonical source formatter.
soli-fmt = { path = "crates/soli-fmt" }
# Prometheus, DogStatsD, OTLP metrics/traces, and request span logging.
soli-metrics = { path = "crates/soli-metrics" }
# Cross-platform OS primitives and edge virtual env/fs.
soli-platform = { path = "crates/soli-platform" }
# SoliDB HTTP and native binary driver clients.
soli-solidb = { path = "crates/soli-solidb" }
# Syntax frontend (span, AST, lexer, parser, syntax errors).
soli-syntax = { path = "crates/soli-syntax" }
# SLV/ERB template parser, ivar analyzer, and declared-props metadata.
soli-template-parser = { path = "crates/soli-template-parser" }
# Static type checker, generics, type environment, and XML class typing.
soli-types = { path = "crates/soli-types" }
soli-lint = { path = "crates/soli-lint" }
soli-graph = { path = "crates/soli-graph" }
soli-module = { path = "crates/soli-module" }
soli-crypto = { path = "crates/soli-crypto" }
soli-stdlib = { path = "crates/soli-stdlib" }
# XML core (parser, mutable tree, serializer, projections, XPath).
soli-xml = { path = "crates/soli-xml" }
# XML support for SOAP
quick-xml = { version = "0.41", features = ["serialize"] }
# Markdown rendering for .md views
pulldown-cmark = "0.12"
# HTML sanitizer — real html5ever-based parser for `sanitize_html`.
# SEC-024: replaces a prior substring-scanner that was bypassed by
# entity-encoded attributes, unquoted attributes, SVG sub-trees, etc.
ammonia = "4"
# Archive extraction for git archive
flate2 = "1.0"
tar = "0.4"
tempfile = "3"
# Image processing (pure Rust, no system deps)
# Default features pull in AVIF (rav1e+ravif ~1.7MB) and EXR/HDR which Soli does not use.
# Enable only the formats referenced in src/interpreter/builtins/image.rs.
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "gif", "bmp", "ico", "tiff"] }
# Lossy WebP encoding (libwebp). The `image` crate only encodes lossless WebP,
# which bloats photos; this gives quality-controlled lossy output for both the
# URL transform pipeline and the storage-time uploader transform.
# Spreadsheet support (CSV and Excel).
# calamine was held at 0.26 for a year because every release resolved quick-xml
# below 0.41, which left RUSTSEC-2026-0194 / -0195 (quadratic duplicate-attribute
# scan; unbounded namespace-declaration allocation) waived in `.cargo/audit.toml`
# — the only *vulnerability*, as opposed to unmaintained-crate, advisory this
# repository has ever waived. calamine 0.36.1 required quick-xml ^0.41, so the
# waiver went. 0.38 is the floor now: it fixes RUSTSEC-2026-0436 (a panic and an
# unbounded allocation in the OLE2 parser that `Xlsx::new` runs on every file,
# to detect an encrypted workbook) and is the first release on zip 9, which
# retired the vendored copy. Do not lower it.
calamine = { version = "0.38", optional = true }
csv = { version = "1.3", optional = true }
# Writing xlsx is in-tree (`XlsxSheet` in builtins/spreadsheet.rs): six XML
# parts in a zip, on the same `zip` build calamine already uses.
# 9.0: every release before 9.0.3 was yanked on 2026-10-16 for security
# advisories (GHSA-vv5m-jxxh-4627, GHSA-4v9h-p7m9-rh26, GHSA-4684-h2q9-2vcp,
# more announced); calamine 0.38 builds on it.
zip = { version = "9.0", default-features = false, features = ["deflate"], optional = true }
# Pinned transitive dependency. Floor >=0.3.47 fixes RUSTSEC-2026-0009; ceiling
# <0.3.52 keeps `cookie` 0.18.1 building — time 0.3.52 changed `Parsable::parse`
# to a 2-arg signature that cookie still calls with one arg. lopdf 0.43 needs
# >=0.3.51, so the unified version resolves to exactly 0.3.51. Without the ceiling,
# an unlocked build (e.g. `cargo install` without `--locked`) grabs 0.3.52 and fails
# to compile cookie. Drop the ceiling once cookie ships a release built on time 0.3.52.
time = ">=0.3.47, <0.3.52"
# Language Server Protocol (used by `soli lsp`), with native async trait methods.
tower-lsp-server = { version = "0.23", optional = true }
log = "0.4"
# POP3 email reading: sync rustls over std TcpStream + MIME parsing.
# `ring` provider matches the rest of the build (reqwest/jsonwebtoken use ring, not aws-lc-rs).
webpki-roots = "1.0.7"
mail-parser = { version = "0.11.3", optional = true }
# Outbound email (Mailer): RFC 5322 / MIME message construction. The SMTP
# transport itself is hand-rolled over the sync rustls stream above (see
# builtins/mailer/smtp.rs), mirroring the POP3 client.
mail-builder = { version = "0.4", optional = true }
# JSON-template + Factur-X PDF generation (vendored crate, lives in pdf/).
soli-pdf = { path = "pdf", optional = true }
# EUI: the binary UI protocol. **In the default set** — it adds the
# `/_eui/session/<component>` socket, the one-shot render of 01 §2.4 and the
# `router_eui` builtin, and changes nothing else. The wire crate has no
# dependencies of its own. Being a default is why a stale `rev =` below takes
# the whole of `cargo test` down rather than one optional job; it read "off by
# default" here long after it stopped being true.
# Fetched from the public eui repository, not from a sibling checkout. Cargo
# loads a path dependency's manifest even when its feature is off, so a path
# here made `cargo build` fail for anyone without ../eui — CI included, which is
# how it broke every build job on the v2.1.0 tag. Pinned by rev; Cargo.lock
# records the same commit. To work on the protocol locally, patch it back to the
# checkout in a local (untracked) .cargo/config.toml rather than here:
# [patch."https://github.com/solisoft/eui"]
# eui-proto = { path = "../eui/crates/eui-proto" }
# eui-client = { path = "../eui/crates/eui-client" }
eui-proto = { git = "https://github.com/solisoft/eui", rev = "36fd450", optional = true }
eui-client = { git = "https://github.com/solisoft/eui", rev = "36fd450", optional = true }
# The score engraver is not compiled in: the application ships it as a
# WebAssembly module (`soli.toml`, `[eui] score_wasm`), built at its own
# eui-score pin, and `serve::eui::engraver` runs it with wasmtime — a fix to
# the engraver no longer waits for a Soli release (Score #1090). wasmtime 49
# compiles with cranelift 0.136, the one `native` already brings.
wasmtime = { version = "49.0.7", default-features = false, features = ["cranelift", "runtime", "std", "parallel-compilation"], optional = true }
# The blocking binary-protocol client of es, pinned like eui. To work on it
# locally, patch it in the untracked .cargo/config.toml rather than here:
# [patch."https://github.com/solisoft/event_stream"]
# es-client = { path = "../es/crates/es-client" }
es-client = { git = "https://github.com/solisoft/event_stream", rev = "5e2a6ea", optional = true }
# RSA signing (`RsaKey.sign`, PAdES, SAML test responses): blinded and constant
# time, where `BigUint::modpow` over the private exponent was neither. Also the
# EUI frame hashing. Already in every build through rustls and jsonwebtoken.
ring = "0.17"
blake3 = { version = "1", optional = true }
# `.soligraph.toml` config for `soli graph build` on non-Soli repos.
toml = "0.8"
cms = { version = "0.2", features = ["std"], optional = true }
x509-cert = "0.2"
# SQL document adapters — core lives in crates/soli-db; `postgres` and `rusqlite`
# remain optional here for `serve::response_cache` and integration tests.
postgres = { version = "0.19.14", features = ["with-serde_json-1"], optional = true }
rusqlite = { version = "0.41", features = ["bundled", "hooks", "serde_json"], optional = true }
# Cron expression parsing for the job scheduler (src/jobs/scheduler.rs). Six
# fields (`sec min hour dom mon dow`) — the same crate and semantics the
# schedules were validated against before the scheduler moved into Soli, so
# existing expressions keep their meaning.
cron = "0.15"
# Everything above builds for wasm32 too — the edge (Cloudflare Workers) build,
# `edge/`. What follows needs sockets, threads, a terminal or a C toolchain, so
# it is native-only; for `tokio`, `reqwest`, `image` and `tokio-tungstenite` it
# adds the native features on top of the shared ones above. A native build gets
# exactly the feature set it had before the split.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
mimalloc = { version = "0.1", default-features = false, features = ["no_thp"] }
# Stackful coroutines: several requests on one worker (`SOLI_COROUTINES`).
corosensei = "0.3"
crossterm = "0.28"
gag = "1.0"
reqwest = { version = "0.12", features = ["rustls-tls", "blocking", "cookies", "http2"], default-features = false }
ureq = { version = "2.9", features = ["json"] }
hyper-util = { version = "0.1", features = ["tokio", "server", "server-auto"] }
tokio = { version = "1", features = ["rt-multi-thread", "net", "process", "io-std", "signal", "fs"] }
tokio-tungstenite = "0.24"
hyper-tungstenite = "0.15"
notify = "8"
image = { version = "0.25", default-features = false, features = ["webp", "rayon"] }
webp = "0.3"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
rustls-pki-types = { version = "1", features = ["std"] }
# The edge build: randomness and clocks from the JS host (`getrandom`, `uuid`,
# `chrono`).
[target.'cfg(target_arch = "wasm32")'.dependencies]
chrono = { version = "0.4", features = ["wasmbind"] }
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }
getrandom03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
# 0.4 comes with the RustCrypto 0.14 family (p256 -> crypto-bigint 0.7).
getrandom04 = { package = "getrandom", version = "0.4", features = ["wasm_js"] }
uuid = { version = "1", features = ["js"] }
# Windows-only dependencies. `windows-sys` is pure Rust bindings — no C
# toolchain involved — so it compiles for the Windows target from any host.
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = [
"Win32_Foundation",
"Win32_Storage_FileSystem",
"Win32_System_IO",
"Win32_System_JobObjects",
"Win32_System_Threading",
"Win32_System_ProcessStatus",
"Win32_Security",
"Win32_Security_Authorization",
] }
# Unix-only dependencies.
#
# These were unconditional, which made the crate impossible to build for
# Windows at dependency-resolution time — before a single cfg mismatch was even
# reached. `nix` wraps POSIX signals. (`daemonize` and `ssh2` were here too;
# `soli serve -d` now forks itself and `soli deploy` runs the system `ssh`.)
[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["signal", "process"] }
[dev-dependencies]
pretty_assertions = "1.4"
criterion = { version = "0.5", features = ["html_reports"] }
soli-core = { path = "crates/soli-core", features = ["test-utils"] }
soli-stdlib = { path = "crates/soli-stdlib", features = ["test-utils"] }
[[bench]]
name = "interpreter"
harness = false
[[bench]]
name = "vm"
harness = false
[[bench]]
name = "collections_perf"
harness = false
[[bench]]
name = "json_paths"
harness = false
[[bench]]
name = "array_string_paths"
harness = false
[[bench]]
name = "eui_render"
harness = false
required-features = ["eui"]
[[bench]]
name = "hash_get_set"
harness = false
[[bench]]
name = "template_render"
harness = false
# Check, clippy and `cargo test` typecheck this crate as one unit. Line tables
# keep panic locations; full debuginfo is most of the compile and link cost.
[profile.dev]
debug = "line-tables-only"
# Everyday optimized build: `cargo install --path .`, local perf checks, and
# anything that iterates. ThinLTO over 16 codegen units runs on every core and
# costs a few percent of runtime against `dist`. It is not the shipped binary:
# `dist` below is.
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 16
strip = "symbols"
# The shipped binary: tag builds (`build-binaries` in ci.yml), the Docker image,
# and `scripts/bench.sh`. Fat LTO over a single codegen unit optimizes the whole
# crate graph as one serial unit. That is the last few percent of speed, and it
# takes minutes on one core, which is why nothing that iterates builds it.
# `cargo install solilang --profile dist` gets this build from crates.io.
[profile.dist]
inherits = "release"
lto = "fat"
codegen-units = 1
# NOTE: do not set `panic = "abort"` here.
#
# The server's fault isolation is built on `std::panic::catch_unwind`, which is
# a no-op under `panic = "abort"` — the process aborts at the panic site instead.
# Setting it silently turns all three of these into dead code, so a single panic
# in one worker takes down every worker in the process:
#
# * the per-request guard in `serve::dispatch_http_request` (returns a 500 and
# keeps the worker serving),
# * the web-worker restart loop in `serve::run_hyper_server_worker_pool`,
# * the background-job pool restart loop in `serve::background_jobs`.
#
# Unwinding is the default; it is spelled out here only so the reason survives
# the next binary-size or startup-time pass.
# The profile CI's engine-parity sweeps build against.
#
# Those sweeps check semantics: that the two engines agree on an expression,
# that `soli check` accepts calls that work, that hostile input does not panic.
# None of that depends on how codegen is partitioned, but building it under
# `release` (then fat LTO, now `dist`) did: fat LTO optimizes the whole crate graph as one serial unit, so
# the build took 896s while the sweeps themselves took 62s — 90% of the job, and
# the critical path of the entire CI run. `rust-cache` evicts the workspace
# crate's own artifacts by design, so that cost was paid on every run, cache hit
# or not.
#
# Inheriting from `release` is what keeps this honest. `opt-level`,
# `debug-assertions` and `overflow-checks` are the settings that change
# observable behavior, and they carry over untouched; `lto` and `codegen-units`
# only decide how the work is split across cores. What the sweeps no longer test
# is a byte-identical copy of the shipped binary, so an LTO-only miscompilation
# would escape this job — `build-binaries` still does a true `dist` build on
# every tag.
[profile.ci]
inherits = "release"
lto = false
codegen-units = 16
[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
[patch.crates-io]
# mail-builder reads the clock through std::time, which panics in a Worker:
# vendor/mail-builder/VENDORED.md.
mail-builder = { path = "vendor/mail-builder" }