返回 CodeWhale
Cargo.toml
根目录 / Cargo.toml
1 [workspace]
2 members = [
3 "crates/agent",
4 "crates/app-server",
5 "crates/build-support",
6 "crates/cli",
7 "crates/cloud-facts",
8 "crates/command-contract",
9 "crates/config",
10 "crates/core",
11 "crates/execpolicy",
12 "crates/hooks",
13 "crates/lane",
14 "crates/localization",
15 "crates/mcp",
16 "crates/memory",
17 "crates/models",
18 "crates/palette",
19 "crates/paths",
20 "crates/protocol",
21 "crates/release",
22 "crates/secrets",
23 "crates/state",
24 "crates/telemetry",
25 "crates/tools",
26 "crates/tui",
27 "crates/workflow",
28 "crates/workflow-js",
29 ]
30 default-members = ["crates/cli"]
31 resolver = "2"
32
33 [workspace.package]
34 version = "0.10.0"
35 edition = "2024"
36 # Rust 1.88 stabilized `let_chains` in `if`/`while` conditions, which the
37 # codebase relies on extensively. Cargo enforces this so users on older
38 # toolchains get a clear "package requires rustc 1.88+" error instead of a
39 # confusing E0658 from rustc.
40 rust-version = "1.88"
41 license = "MIT"
42 repository = "https://github.com/Hmbown/CodeWhale"
43
44 # Record the policy CI already applies via `RUSTFLAGS: -Dwarnings`.
45 # Member crates opt in with `[lints] workspace = true`. This does not add
46 # new lints; it makes the existing gate visible in the manifest so
47 # `cargo check` without extra flags matches CI.
48 [workspace.lints.rust]
49 warnings = "deny"
50
51 [workspace.dependencies]
52 anyhow = "1.0.100"
53 async-trait = "0.1.89"
54 axum = { version = "0.8.5", features = ["json"] }
55 chrono = { version = "0.4.43", features = ["serde"] }
56 clap = { version = "4.5.54", features = ["derive"] }
57 clap_complete = "4.5"
58 dirs = "7.0.0"
59 encoding_rs = "0.8.35"
60 # Sole user is crates/workflow-js (schemaui is gone); keep the graph on one
61 # jsonschema/jsonschema-regex/referencing/fancy-regex stack.
62 jsonschema = { version = "0.52", default-features = false }
63 libc = "0.2"
64 reqwest = { version = "0.13.1", default-features = false, features = ["json", "rustls-no-provider", "socks"] }
65 # NOT "parallel": the Workflow VM stays single-threaded and bridges to the
66 # multi-thread engine over channels (see crates/workflow-js).
67 rquickjs = { version = "0.12", features = ["futures"] }
68 rustls = { version = "0.23.36", default-features = false, features = ["ring", "std", "tls12"] }
69 rusqlite = { version = "0.40.2", features = ["bundled"] }
70 serde = { version = "1.0.228", features = ["derive"] }
71 serde_json = "1.0.149"
72 semver = "1.0.28"
73 thiserror = "2.0"
74 tempfile = "3.27"
75 tokio = { version = "1.50.0", features = ["fs", "io-util", "io-std", "macros", "net", "process", "rt", "rt-multi-thread", "signal", "sync", "time"] }
76 toml = "1.0.6"
77 toml_edit = "0.25.12"
78 sha2 = "0.11"
79 tower-http = { version = "0.7", features = ["cors"] }
80 tracing = "0.1"
81 tracing-appender = "0.2"
82 tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
83 uuid = { version = "1.11", features = ["v4"] }
84 mimalloc = { version = "0.1", default-features = false }
85 # Off-by-default alternative to mimalloc behind the `rusty-alloc` feature in
86 # codewhale-tui / codewhale-cli (#5872): the pure-Rust mimalloc v2.4.5
87 # remake — no C compiler, no build script on that path. `rusty_alloc-api` is
88 # the crate's documented surface; it pulls the `rusty_alloc` core transitively
89 # at the same version.
90 rusty_alloc-api = "1.1.6"
91
92 # The everyday `--release` gate (AGENTS.md pre-push build): optimized but
93 # fast to produce. Shipping artifacts use `--profile dist` below — fat LTO on
94 # a 680k-line crate belongs in release CI, not in every contributor's loop
95 # (#5246; community-reported 8–16 minute local release builds, #4991).
96 # Dev/test carry line tables instead of full debug info. Backtraces still name
97 # the file and line of every frame — the thing anyone actually reads — but the
98 # per-variable DWARF that no one inspects without a debugger attached is gone.
99 # The debug binary was 227 MB and target/debug had grown past 260 GB; those
100 # links are IO-bound, so the debuginfo is paid on every incremental build.
101 # Anyone stepping through under lldb can override this locally.
102 [profile.dev]
103 debug = "line-tables-only"
104
105 [profile.release]
106 lto = "thin"
107 strip = true
108 codegen-units = 16
109
110 # Shipping profile: exactly the optimization the released binaries have
111 # always had. Every workflow that uploads a binary to users builds with
112 # `--profile dist` and collects from `target/**/dist/`.
113 # NOTE: no `panic = "abort"` here — the TUI's panic supervision
114 # (catch_unwind/spawn_supervised) needs unwinding so one panicking tool call
115 # or task fails gracefully instead of aborting the whole session.
116 [profile.dist]
117 inherits = "release"
118 lto = true
119 strip = true
120 codegen-units = 1
121
122 # Patch unicode-width so that width() uses CJK tables when the cjk feature
123 # is enabled. Vanilla unicode-width 0.2.2 provides width_cjk() as a separate
124 # method but the original width() always uses non-CJK tables, so Ratatui
125 # (which calls width() internally) measures ambiguous-width characters
126 # (circled digits, enclosed alphanumerics) as 1 column. CJK terminals render
127 # them as 2 columns, causing cell-offset rendering glitches. (#4479)
128 [patch.crates-io]
129 unicode-width = { path = "patches/unicode-width-0.2.2" }
130
130 lines TOML