Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
160 lines (134 loc) · 4.88 KB
/
Copy pathCargo.toml
File metadata and controls
160 lines (134 loc) · 4.88 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
[workspace]
members = ["."]
default-members = ["."]
resolver = "2"
[workspace.package]
version = "0.118.0"
edition = "2024"
rust-version = "1.98"
license = "MIT"
authors = ["Cesar Ferreira"]
repository = "https://github.com/cesarferreira/stax"
[package]
name = "stax"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
default-run = "stax"
description = "Fast stacked Git branches and PRs"
license.workspace = true
authors.workspace = true
repository.workspace = true
# Integration tests are consolidated into a single binary (tests/all_tests.rs)
# instead of one binary per file. Linking ~50 separate test binaries (each
# statically linking the whole stax lib + octocrab/git2/ratatui) dominated build
# time; one binary links once. Disable auto-discovery so the per-file targets
# are not also built.
autotests = false
# Keep the published crate small (crates.io has a 10 MB limit): exclude the
# documentation screenshots and the mkdocs `docs/` tree, which are only used by
# the README/website and are not needed to build or run stax. The embedded
# `assets/*.wav` alert sounds (see `include_bytes!` in src/notifications.rs) and
# their license files are intentionally kept.
exclude = [
"assets/*.png",
"docs/",
]
[lib]
name = "stax"
path = "src/lib.rs"
[[bin]]
name = "stax"
path = "src/main.rs"
[[bin]]
name = "st"
path = "src/bin/st.rs"
# Single consolidated integration-test binary. See `autotests = false` above.
[[test]]
name = "all_tests"
path = "tests/all_tests.rs"
[features]
default = []
[dependencies]
# CLI
clap = { version = "4", features = ["derive"] }
clap_complete = "4"
# Git. The git CLI does all network work, so libgit2 is built without
# transports: an HTTPS build loads OpenSSL and its CA bundle on every run.
git2 = { version = "0.21", default-features = false, features = ["vendored-libgit2"] }
# GitHub API
octocrab = "0.54.1"
# Proxy-aware GitHub transport (octocrab's own hyper client ignores HTTPS_PROXY;
# see src/github/transport.rs). Versions match what octocrab/reqwest already pull in.
http = "1"
http-body-util = "0.1"
tower = { version = "0.5", default-features = false, features = ["util"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "sync", "signal", "time"] }
futures-util = { version = "0.3", default-features = false, features = ["std"] }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Terminal UI
dialoguer = { version = "0.12", features = ["fuzzy-select", "editor"] }
console = "0.16"
colored = "3"
fuzzy-matcher = "0.3"
indicatif = "0.18"
ratatui = "0.30"
crossterm = "0.29"
termimad = "0.35"
# Error handling
anyhow = "1"
signal-hook = "0.4"
# Clipboard (text-only — skip image support to avoid pulling in the image crate)
arboard = { version = "3", default-features = false }
# Regex
regex = "1"
# Config
toml = "1"
dirs = "7"
chrono = "0.4"
# Update checking
update-informer = "1"
# Advisory file locking for the warm-worktree pool manifest
fs4 = "1.1.0"
# Temp files
tempfile = "3"
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls-no-provider"] }
# TLS crypto provider (needed to install default provider for tests using octocrab)
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
# Local web workspace (`st web`)
axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "query", "form", "json"] }
maud = { version = "0.27", features = ["axum"] }
getrandom = "0.4"
[dev-dependencies]
tempfile = "3"
serde_json = "1"
wiremock = "0.6"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
# Full debuginfo makes linking the ~50 integration-test binaries dominate
# build time (each statically links the whole stax lib + octocrab/git2/ratatui).
# Strip symbols from released binaries. This is a no-op on macOS (release
# binaries there are already symbol-free) but meaningfully shrinks the
# Linux/Windows binaries users download from GitHub releases. LTO and
# codegen-units=1 were evaluated and dropped: stax is I/O/network-bound (libgit2
# + GitHub API), so tighter codegen gives no perceptible runtime win and only
# slows CI release builds. `panic = "abort"` is off because src/application/ci.rs
# relies on std::panic::catch_unwind.
[profile.release]
strip = true
# `line-tables-only` keeps file/line numbers in panic backtraces while cutting
# the per-binary relink from ~13s to ~5s. `unpacked` skips the dsymutil pack
# step on macOS, which further speeds linking.
[profile.dev]
debug = "line-tables-only"
split-debuginfo = "unpacked"
# `test` inherits from `dev`, but be explicit so test-binary links stay fast.
[profile.test]
debug = "line-tables-only"
split-debuginfo = "unpacked"
# Linux container test runs (Docker / Apple Container / CI): skip debuginfo for
# faster linking when target/ is bind-mounted from the macOS host.
[profile.test-container]
inherits = "test"
debug = 0