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
mod agents;
mod aside;
mod bench;
mod brief;
mod browse;
mod capability;
mod claude_mod;
mod cli;
mod client;
mod config;
mod desk;
mod desktop;
mod git;
mod hook;
mod mcp;
mod pane;
mod peer;
mod platform;
mod project;
mod prompt;
mod receive;
mod render;
mod reset;
mod resolve;
mod screen;
mod secrets;
mod server;
mod session;
mod setup;
mod statusline;
mod store;
/// `build.rs` compiles this one for itself -- it is what strips `ui/` on the
/// way into the binary and joins a script's parts -- and the daemon shares
/// it: under `SNYVI_UI_DIR` an asset kept as parts is joined the same way
/// (`server::assets`), and the scanner's tests are in `cargo test`.
mod strip;
mod text;
mod thread;
mod update;
mod version;
mod watch;
mod widget;
/// "1 panel", "3 panels": a count in words, never "panel(s)"
/// (docs/DESIGN.md ยง3.1). Regular plurals only, which is every word it is
/// asked for.
pub(crate) fn plural(n: usize, word: &str) -> String {
format!("{n} {word}{}", if n == 1 { "" } else { "s" })
}
use anyhow::Result;
// musl's allocator is slow under the renderer's allocation pattern; mimalloc keeps the
// static binary as fast as the glibc build.
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn main() -> Result<()> {
cli::run()
}