-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
96 lines (92 loc) · 4.41 KB
/
Copy pathCargo.toml
File metadata and controls
96 lines (92 loc) · 4.41 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
[workspace]
members = [
"crates/codemark-core",
"crates/codemark-cli",
"crates/codetours-server",
"crates/codemark-tui",
]
resolver = "2"
# `release` stays fast for day-to-day `cargo build/install --release`.
[profile.release]
strip = true # cheap; remove symbols
opt-level = "z" # optimize for size
# `dist` is the size-optimized profile used for published binaries. The
# expensive settings (lto + single codegen unit) live here so they don't slow
# down ordinary development builds. Build with: cargo build --profile dist
[profile.dist]
inherits = "release"
lto = true # cross-crate inlining + dead-code elimination
codegen-units = 1 # better optimization, smaller output
panic = "abort" # drop unwinding tables
[workspace.dependencies]
axum = "0.7"
tokio = { version = "1", features = ["full"] }
tower = "0.5"
tower-http = { version = "0.5", features = ["trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
clap = { version = "4", features = ["derive", "env"] }
anyhow = "1"
thiserror = "2"
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
regex = "1"
# git2 is used only for local repository operations (open/discover/commit/blob);
# all network git access goes through the `git` CLI in git/remote.rs. We disable
# the default `https`/`ssh` features (which pull in openssl-sys) and vendor
# libgit2 so cross-compiling to musl/Windows needs no system C libraries.
git2 = { version = "0.20", default-features = false, features = ["vendored-libgit2"] }
rusqlite = { version = "0.37", features = ["bundled"] }
tree-sitter = "0.25"
tempfile = "3"
deadpool-sqlite = "0.12"
jsonwebtoken = "9"
# rustls-tls instead of the default native-tls (openssl) backend so binaries
# link no system TLS library — required for static musl builds and simple
# Windows cross-compilation. Crates needing streaming add `features = ["stream"]`.
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
tracing-appender = "0.2"
urlencoding = "2"
# Config for 'dist'
[workspace.metadata.dist]
# Build with the size-optimized profile defined above.
cargo-dist-profile = "dist"
# CI backends to support
ci = "github"
# The installers to generate for each app.
#
# Homebrew is intentionally NOT a dist installer. dist generates one formula per
# *package* (codemark-cli -> codemark.rb shipping only `codemark`; codemark-tui
# -> codemark-tui.rb), and there's no way to merge two packages' binaries into a
# single formula. We want one `brew install .../codemark` to ship *both*
# binaries, so the formula is hand-maintained in the tap and rendered from the
# precompiled archives dist uploads (see the `publish-homebrew-formula` job in
# .github/workflows/release.yml). Letting dist also publish homebrew would
# clobber that combined formula on every release.
installers = ["shell", "powershell"]
# Target platforms to build apps for (Rust target-triple syntax).
# Linux is glibc-only (gnu) on purpose: codemark's native C/C++ deps (esaxx-rs
# via tokenizers, sqlite-vec) need a Zig toolchain + CFLAGS shim to build for
# musl, which isn't worth shipping. The musl target is still built on every PR
# by the `cross-platform` job in .github/workflows/test.yml as a portability
# canary. (Regenerated by `dist generate`; edit then re-run that command.)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.32.0"
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to install an updater program
install-updater = false
# Don't have dist create the GitHub Release. The release is created/published
# from the GitHub UI (or by pushing a tag), which is what triggers this
# workflow; dist just uploads its build artifacts/installers to that existing
# release instead of trying to `gh release create` a tag that already exists.
create-release = false
# Allow hand-edits to the generated CI workflow (release.yml) without `dist plan`
# failing its "out of date contents" check. We add `--clobber` to the release
# asset upload by hand so re-runs are idempotent; that flag isn't emitted by
# `dist generate`, so dist must be told the CI file is intentionally dirty.
allow-dirty = ["ci"]