-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
99 lines (85 loc) · 4.36 KB
/
Copy pathCargo.toml
File metadata and controls
99 lines (85 loc) · 4.36 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
[package]
name = "telex"
version = "0.1.2"
edition = "2021"
description = "A CLI-first message fabric for AI agent sessions"
license = "MIT"
repository = "https://github.com/lossyrob/telex"
default-run = "telex"
# The workspace has two members: the root `telex` package (lib + `telex` binary) and the
# `telex-console` TUI crate. `spike/` (a throwaway feasibility crate) stays excluded so a plain
# `cargo build` at the repo root builds only `telex`; build the console with `-p telex-console`.
[workspace]
members = ["telex-console", "telex-watcher"]
exclude = ["spike"]
[[bin]]
name = "telex"
path = "src/main.rs"
[lib]
name = "telex"
path = "src/lib.rs"
[dependencies]
# Core (always compiled)
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "time", "sync", "signal", "process"] }
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
anyhow = "1"
clap = { version = "4", features = ["derive", "env"] }
dirs = "5"
getrandom = "0.2"
# SQLite backend (feature: sqlite)
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
# Postgres backend (feature: postgres)
tokio-postgres = { version = "0.7", optional = true }
postgres-native-tls = { version = "0.5", optional = true }
native-tls = { version = "0.2", optional = true }
futures-util = { version = "0.3", optional = true }
# Entra auth for Postgres (feature: entra) — the GA Azure SDK.
azure_identity = { version = "1", optional = true }
azure_core = { version = "1", optional = true }
# Self-update (feature: self-update) — in-binary `telex upgrade` release fetch:
# discover a GitHub release, download the platform asset + checksum, verify SHA-256,
# and extract telex(.exe) before installing through the versioned layout.
# reqwest pins native-tls (reusing the postgres/native-tls stack) so default builds do
# not gain a second active TLS stack; sha2 is already in the tree via postgres-protocol.
# flate2 uses its pure-Rust miniz_oxide backend (no system zlib); zip only needs deflate.
reqwest = { version = "0.13", default-features = false, features = ["native-tls"], optional = true }
sha2 = { version = "0.11", optional = true }
zip = { version = "2", default-features = false, features = ["deflate"], optional = true }
tar = { version = "0.4", optional = true }
flate2 = { version = "1", optional = true }
# Vendor OpenSSL on Linux only when the Postgres backend (native-tls) is enabled, so
# Linux release builds are self-contained. Windows uses schannel, macOS Security.framework.
[target.'cfg(target_os = "linux")'.dependencies]
openssl = { version = "0.10", features = ["vendored"], optional = true }
# Session-binding liveness check (issue #5): watch a launcher/session pid and self-exit when it
# dies. Both crates are already present in the lock tree (transitively via tokio), so pinning
# them as direct platform-gated deps fixes the API surface without growing the dependency graph.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Pipes", "Win32_System_Threading"] }
[features]
# Batteries-included default. Build a leaner binary with e.g.
# cargo install telex --no-default-features --features sqlite
default = ["sqlite", "postgres", "self-update"]
sqlite = ["dep:rusqlite"]
postgres = ["dep:tokio-postgres", "dep:postgres-native-tls", "dep:native-tls", "dep:futures-util", "dep:openssl"]
entra = ["postgres", "dep:azure_identity", "dep:azure_core"]
# In-binary release upgrade path (`telex upgrade` with no --from). Default-on so every
# shipped binary can self-update; omit it (e.g. `--no-default-features --features sqlite`)
# for a lean build, where `telex upgrade` without --from returns an actionable error.
self-update = ["dep:reqwest", "dep:sha2", "dep:zip", "dep:tar", "dep:flate2"]
[profile.release]
strip = true
lto = "thin"
[dev-dependencies]
# Archive builders + hashing for the release-upgrade integration test: package the built
# telex binary into a fixture zip/tar.gz + sha256 sidecar served by a local HTTP server.
# Already present in the self-update dependency tree; declared here for the test crate.
zip = { version = "2", default-features = false, features = ["deflate"] }
tar = "0.4"
flate2 = "1"
sha2 = "0.11"