Cargo.toml
⎇
Raw
1[package]
2name = "server"
3version = "0.1.0"
4edition = "2024"
5license = "AGPL-3.0-or-later"
6
7[[bin]]
8name = "filebrowser-ng"
9path = "src/main.rs"
10
11[dependencies]
12api-types = { path = "../api-types" }
13anyhow = "1"
14argon2 = "0.5"
15axum = "0.8"
16bytes = "1"
17chrono = { version = "0.4", features = ["serde"] }
18clap = { version = "4", features = ["derive", "env"] }
19# WebDAV protocol only. The bundled `localfs`/`memfs` backends are off: the
20# dav filesystem is `api::dav`, which goes through `crate::fs` so that root
21# containment, read-only roots and share scoping apply to a mount too.
22dav-server = { version = "0.11", default-features = false }
23# Thumbnails: decode only what the grid can show. The default feature set
24# also pulls in rav1e and exr, which are large and unused here.
25image = { version = "0.25", default-features = false, features = [
26 "jpeg",
27 "png",
28 "gif",
29 "webp",
30 "bmp",
31 "tiff",
32] }
33# Lanczos3 downscaling. `image`'s own is 15x slower at the same quality.
34fast_image_resize = { version = "5", features = ["image"] }
35# libwebp for the encoder. The crate vendors the C source and builds it with
36# `cc`; no system library, same as the bundled SQLite.
37webp = "0.3"
38# `default-features = false` drops the `cfb` dependency (compound-document
39# detection we do not need) and makes this a zero-dependency crate.
40infer = { version = "0.16", default-features = false, features = ["alloc"] }
41mime_guess = "2"
42multer = { version = "3", features = ["tokio-io"] }
43rand = "0.8"
44rusqlite = { version = "0.37", features = ["bundled"] }
45serde = { version = "1", features = ["derive"] }
46serde_json = "1"
47sha2 = "0.10"
48thiserror = "2"
49tokio = { version = "1", features = [
50 "rt-multi-thread",
51 "macros",
52 "fs",
53 "io-util",
54 "sync",
55 "time",
56 "signal",
57 "process",
58] }
59tar = "0.4"
60flate2 = "1"
61zstd = "0.13"
62# Deflate only; the defaults add AES, bzip2, lzma, ppmd, zopfli.
63zip = { version = "9.0.0-pre3", default-features = false, features = ["deflate-flate2-zlib-rs"] }
64tower-http = { version = "0.6", features = ["trace", "set-header"] }
65# Named in the `DavLockSystem` impl. dav-server does not re-export it, so the
66# version has to track dav-server's own.
67xmltree = "0.12"
68futures-util = "0.3"
69# Typed `Authorization: Basic` parsing. Already in the tree via dav-server.
70headers = "0.4"
71tokio-stream = { version = "0.1", features = ["sync"] }
72tracing = "0.1"
73tracing-subscriber = { version = "0.3", features = ["env-filter"] }
74ignore = "0.4"
75grep = "0.4"
76webauthn-rs = { version = "0.5.5", features = ["conditional-ui"], default-features = false }
77uuid = { version = "1.26.1", features = ["v4"] }
78# For `ResidentKeyRequirement` and `AllowCredentials`, which `webauthn-rs` uses
79# internally but does not re-export. Keep this version equal to webauthn-rs'
80# own: it already pulls this crate in, and two different versions would compile
81# while being different types.
82webauthn-rs-proto = "0.5.5"
83
84[dev-dependencies]
85base64 = "0.22"
86tempfile = "3"
87tower = { version = "0.5", features = ["util"] }
88http-body-util = "0.1"
89bytes = "1"
90flate2 = "1"
91zstd = "0.13"
92tar = "0.4"
93zip = { version = "9.0.0-pre3", default-features = false, features = ["deflate-flate2-zlib-rs"] }
94
95[dependencies.rust-embed]
96version = "8"
97optional = true
98
99[features]
100# Embed the frontend (built into server/dist by `just build`).
101# Without this feature the server reads the frontend from disk at runtime
102# (Trunk's output directory, or $FBNG_DIST), which is the dev flow.
103embedded = ["dep:rust-embed"]
104