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