-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathCargo.toml
More file actions
97 lines (91 loc) · 4.52 KB
/
Copy pathCargo.toml
File metadata and controls
97 lines (91 loc) · 4.52 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
[package]
name = "elephc"
version = "0.26.3"
edition = "2021"
default-run = "elephc"
description = "A PHP-to-native AOT compiler"
license = "MIT"
repository = "https://github.com/illegalstudio/elephc"
homepage = "https://github.com/illegalstudio/elephc"
readme = "README.md"
keywords = ["php", "compiler", "aot", "native", "codegen"]
categories = ["compilers", "command-line-utilities"]
# The bridge staticlibs are default workspace members so plain `cargo build` /
# `cargo test` materialize libelephc_tls.a (https:// wrapper),
# libelephc_pdo.a (PDO: SQLite + PostgreSQL), libelephc_crypto.a
# (hash/HMAC family), libelephc_phar.a (runtime phar:// archive reads),
# libelephc_tz.a (DateTimeZone introspection: getLocation/getTransitions/
# listAbbreviations), libelephc_image.a (GD/Exif/Imagick/Gmagick/Cairo), and
# libelephc_web.a (--web prefork HTTP server), and libelephc_magician.a
# (optional eval runtime) into target/<profile>/, where linker.rs locates them
# for programs that use those features.
[workspace]
members = [".", "crates/elephc-tls", "crates/elephc-pdo", "crates/elephc-crypto", "crates/elephc-phar", "crates/elephc-tz", "crates/elephc-image", "crates/elephc-web", "crates/elephc-magician"]
default-members = [".", "crates/elephc-tls", "crates/elephc-pdo", "crates/elephc-crypto", "crates/elephc-phar", "crates/elephc-tz", "crates/elephc-image", "crates/elephc-web", "crates/elephc-magician"]
resolver = "2"
[[bin]]
name = "elephc"
path = "src/main.rs"
# Documentation exporter: declared as an example so it can read the eval
# interpreter's metadata (elephc-magician is a dev-dependency) without
# linking magician into the elephc binary.
[[example]]
name = "gen_builtins"
path = "tools/gen_builtins.rs"
[dependencies]
inventory = "0.3"
# Grows the stack on demand inside the recursive-descent parser so deeply
# nested expressions never overflow small (2 MiB test-thread) stacks.
stacker = "0.1"
bitflags = "2"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
sha2 = "0.10"
toml = "0.9"
toml_edit = "0.25"
tar = "0.4"
fs2 = "0.4"
ureq = { version = "3", default-features = false, features = ["rustls"] }
# flate2 (default miniz_oxide backend = pure Rust, no system zlib) is used by the
# compiler to inflate raw-DEFLATE phar:// entries at compile time. Decompress-only.
flate2 = "1"
# bzip2-rs is a PURE-RUST bzip2 decoder (no system libbz2, no C toolchain) used by
# the compiler to decompress bzip2 phar:// entries at compile time. Decompress-only.
bzip2-rs = "0.1"
elephc-phar = { path = "crates/elephc-phar" }
# indicatif drives the live per-phase spinner and cargo-style "Linking" event
# lines shown while compiling; console (indicatif's own transitive color/TTY
# crate) is added directly too since errors/report.rs and timings.rs style text
# with it independently of the spinner. Both are pure Rust, no C toolchain
# dependency, consistent with flate2/bzip2-rs above.
indicatif = "0.17"
console = "0.15"
# Bridge crates are runtime staticlibs, not used by the Rust compiler itself,
# but codegen tests link their libelephc_*.a artifacts into compiled PHP
# programs. They ship as dev-dependencies so `cargo test` / `cargo nextest run`
# build them automatically. Without this, staticlibs are only built by `cargo
# build` of the default-members, which a sharded nextest run does not perform.
[dev-dependencies]
elephc-tls = { path = "crates/elephc-tls" }
elephc-pdo = { path = "crates/elephc-pdo" }
elephc-crypto = { path = "crates/elephc-crypto" }
elephc-phar = { path = "crates/elephc-phar" }
elephc-tz = { path = "crates/elephc-tz" }
elephc-image = { path = "crates/elephc-image" }
elephc-web = { path = "crates/elephc-web" }
elephc-magician = { path = "crates/elephc-magician" }
# flate2 lets the phar:// codegen tests build gzip (raw-DEFLATE) fixture entries
# with the same encoder the compiler decodes, guaranteeing a version-stable
# round-trip without shelling out to php.
flate2 = "1"
# The streams codegen tests host a local HTTPS fixture so https:// wrapper
# success coverage does not depend on outbound network access.
rustls = { version = "0.23", default-features = false, features = ["std", "ring", "tls12"] }
rustls-pemfile = "2"
# Local test-speed tuning. The dev profile (which `test` inherits) keeps full
# `debug = 2` info by default, which inflates both rustc codegen and the link of
# the six test binaries. `line-tables-only` keeps file:line in panic backtraces
# (so test failures stay legible) while cutting the debug info the assembler and
# linker chew through on every edit -> `cargo test` cycle.
[profile.dev]
debug = "line-tables-only"