A minimal self-hosted git browser on Rust axum: bare repos rendered as a website with commits, diffs, syntax-highlighted blobs, atom feeds, and clone over HTTPS.
axumdockergitgit-browsergitoxidegixrustself-hosted
1[package]
2name = "repos"
3version = "0.1.0"
4edition = "2021"
5# With a second binary in src/bin/ (seed), `cargo run` becomes ambiguous.
6# Pin the default to the server so `cargo run` from the Makefile still works.
7default-run = "repos"
8
9[dependencies]
10axum = { version = "0.8", features = ["macros"] }
11tokio = { version = "1", features = ["full"] }
12tower = { version = "0.5", features = ["util"] }
13tower-http = { version = "0.6", features = ["fs", "set-header"] }
14minijinja = { version = "2", features = ["loader", "loop_controls"] }
15gix = { version = "0.66", default-features = false, features = ["max-performance-safe", "blob-diff", "revision"] }
16syntect = { version = "5", default-features = false, features = ["default-fancy"] }
17pulldown-cmark = { version = "0.12", default-features = false, features = ["html"] }
18ammonia = "4"
19serde = { version = "1", features = ["derive"] }
20serde_json = "1"
21chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
22anyhow = "1"
23tracing = "0.1"
24tracing-subscriber = { version = "0.3", features = ["env-filter"] }
25dotenvy = "0.15"
26bytes = "1"
27urlencoding = "2"
28futures-util = "0.3"
29async-stream = "0.3"
30mime_guess = "2"
31
32[profile.release]
33# Match darkfurrow: small + fast. Repos has no chunky dep tree
34# (no typst, no chromium) so LTO is tractable.
35lto = true
36codegen-units = 1
37strip = true