[package] name = "server" version = "0.1.0" edition = "2024" license = "AGPL-3.0-or-later" [[bin]] name = "filebrowser-ng" path = "src/main.rs" [dependencies] api-types = { path = "../api-types" } anyhow = "1" argon2 = "0.5" axum = "0.8" bytes = "1" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4", features = ["derive", "env"] } # WebDAV protocol only. The bundled `localfs`/`memfs` backends are off: the # dav filesystem is `api::dav`, which goes through `crate::fs` so that root # containment, read-only roots and share scoping apply to a mount too. dav-server = { version = "0.11", default-features = false } # Thumbnails: decode only what the grid can show. The default feature set # also pulls in rav1e and exr, which are large and unused here. image = { version = "0.25", default-features = false, features = [ "jpeg", "png", "gif", "webp", "bmp", "tiff", ] } # Lanczos3 downscaling. `image`'s own is 15x slower at the same quality. fast_image_resize = { version = "5", features = ["image"] } # libwebp for the encoder. The crate vendors the C source and builds it with # `cc`; no system library, same as the bundled SQLite. webp = "0.3" # `default-features = false` drops the `cfb` dependency (compound-document # detection we do not need) and makes this a zero-dependency crate. infer = { version = "0.16", default-features = false, features = ["alloc"] } mime_guess = "2" multer = { version = "3", features = ["tokio-io"] } rand = "0.8" rusqlite = { version = "0.37", features = ["bundled"] } serde = { version = "1", features = ["derive"] } serde_json = "1" sha2 = "0.10" thiserror = "2" tokio = { version = "1", features = [ "rt-multi-thread", "macros", "fs", "io-util", "sync", "time", "signal", "process", ] } tar = "0.4" flate2 = "1" zstd = "0.13" # Deflate only; the defaults add AES, bzip2, lzma, ppmd, zopfli. zip = { version = "9.0.0-pre3", default-features = false, features = ["deflate-flate2-zlib-rs"] } tower-http = { version = "0.6", features = ["trace", "set-header"] } # Named in the `DavLockSystem` impl. dav-server does not re-export it, so the # version has to track dav-server's own. xmltree = "0.12" futures-util = "0.3" # Typed `Authorization: Basic` parsing. Already in the tree via dav-server. headers = "0.4" tokio-stream = { version = "0.1", features = ["sync"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } ignore = "0.4" grep = "0.4" [dev-dependencies] base64 = "0.22" tempfile = "3" tower = { version = "0.5", features = ["util"] } http-body-util = "0.1" bytes = "1" flate2 = "1" zstd = "0.13" tar = "0.4" zip = { version = "9.0.0-pre3", default-features = false, features = ["deflate-flate2-zlib-rs"] } [dependencies.rust-embed] version = "8" optional = true [features] # Embed the frontend (built into server/dist by `just build`). # Without this feature the server reads the frontend from disk at runtime # (Trunk's output directory, or $FBNG_DIST), which is the dev flow. embedded = ["dep:rust-embed"]