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