mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
108 lines
3.5 KiB
TOML
108 lines
3.5 KiB
TOML
[workspace]
|
||
resolver = "2"
|
||
members = [
|
||
"crates/oxide_parser",
|
||
"crates/oxide_bytecode",
|
||
"crates/oxide_code_cache",
|
||
"crates/oxide_log",
|
||
"crates/oxide_net",
|
||
"crates/oxide_compiler",
|
||
"crates/oxide_emit",
|
||
"crates/oxide_ir",
|
||
"crates/oxide_cfg",
|
||
"crates/oxide_fold",
|
||
"crates/oxide_dce",
|
||
"crates/oxide_liveness",
|
||
"crates/oxide_regalloc",
|
||
"crates/oxide_types",
|
||
"crates/oxide_vm",
|
||
"crates/oxide_kernel",
|
||
"crates/oxide_runtime_api",
|
||
"crates/oxide_builtins",
|
||
"crates/oxide_engine",
|
||
"crates/oxide_cli",
|
||
"crates/oxide_test262",
|
||
]
|
||
|
||
[workspace.package]
|
||
version = "0.17.5"
|
||
edition = "2021"
|
||
license = "MIT"
|
||
rust-version = "1.80"
|
||
|
||
[workspace.dependencies]
|
||
oxc_parser = "0.134.0"
|
||
oxc_allocator = "0.134.0"
|
||
oxc_ast = "0.134.0"
|
||
oxc_ast_visit = "0.134.0"
|
||
oxc_span = "0.134.0"
|
||
oxc_diagnostics = "0.134.0"
|
||
oxc_syntax = "0.134.0"
|
||
oxide_ir = { path = "crates/oxide_ir" }
|
||
oxide_emit = { path = "crates/oxide_emit" }
|
||
oxide_fold = { path = "crates/oxide_fold" }
|
||
clap = { version = "4", features = ["derive"] }
|
||
ctrlc = { version = "3.4", features = ["termination"] }
|
||
rustyline = "14"
|
||
ansi_term = "0.12"
|
||
serde = "1"
|
||
serde_json = "1"
|
||
dashmap = "6"
|
||
rayon = "1"
|
||
bumpalo = { version = "3", features = ["collections"] }
|
||
hashbrown = "0.14"
|
||
proptest = "1"
|
||
rustc-hash = "2"
|
||
fast-float = "0.2"
|
||
ryu = "1"
|
||
memchr = "2"
|
||
regex = "1"
|
||
regress = { version = "0.11", features = ["utf16"] }
|
||
indexmap = "2"
|
||
lru = "0.18"
|
||
smallvec = { version = "1", features = ["union"] }
|
||
chrono = { version = "0.4", default-features = false, features = ["clock"] }
|
||
unicode-normalization = "0.1"
|
||
tracing = { version = "0.1.44", features = ["max_level_trace", "release_max_level_debug"] }
|
||
tracing-subscriber = { version = "0.3.23", features = ["env-filter", "registry"] }
|
||
tracing-appender = "0.2.5"
|
||
|
||
# 工作区 lint:各 crate 需在自身 Cargo.toml 写 `[lints] workspace = true` 才继承。
|
||
# rust 表把 rustc 告警升为错误(只作用于 workspace crate,依赖不受影响);clippy
|
||
# 表在 clippy 下生效。
|
||
[workspace.lints.rust]
|
||
warnings = "deny"
|
||
|
||
[workspace.lints.clippy]
|
||
all = { level = "deny", priority = -1 }
|
||
|
||
[profile.release]
|
||
# 快速 release:日常墙时间 A/B 与 test262 release 回测用。opt-level 2 与 3 的
|
||
# 运行时差距对解释器可忽略,但 lto 关闭加 codegen 并行把编译时间从数十分钟
|
||
# 压到分钟级。性能基线重锚(release 全量 bench)时如需最优码再临时切回
|
||
# opt-level=3 / lto=true / codegen-units=1。
|
||
opt-level = 2
|
||
lto = false
|
||
codegen-units = 256
|
||
debug = 0
|
||
panic = "abort"
|
||
|
||
[profile.dev]
|
||
# 行表级调试信息:产物体积降 5 至 10 倍(单个 oxide CLI 约 160M 降到 30M 量级),
|
||
# 堆栈回溯仍带行号,日常单测与断点不受影响。
|
||
debug = 1
|
||
|
||
[profile.dev.package."*"]
|
||
# 外部依赖不带调试信息:测试二进制体积的大头是依赖与 std 的调试信息,裁掉后大幅缩短
|
||
# 链接时间与磁盘占用;工作区 crate 自身的行表(上方 debug = 1)保留,便于调试。
|
||
debug = false
|
||
|
||
# 上游 0.11.1 的 Unicode 表缺 Script/Script_Extensions 的 Unknown(Zzzz,未分配
|
||
# 码点集)取值,规范合法模式 \p{Script=Unknown} 无法编译。vendor 补丁在 0.11.1
|
||
# 上补齐该取值,其余行为与上游 0.11.1 逐位一致。
|
||
# utf16 feature 启用单元向匹配入口(find_from_utf16/ucs2):字节字面量优化已是
|
||
# 逐编译运行时 gate,启用该 feature 不再劣化 str 路径(详见 fork 内 optimizer.rs
|
||
# 的 optimize_with_byte_literals)。
|
||
[patch.crates-io]
|
||
regress = { path = "third_party/regress" }
|