Self-hosted fleet management platform for Linux
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: initial setup of crates, axum scaffold

+1600 -38
+1178
Cargo.lock
··· 3 3 version = 4 4 4 5 5 [[package]] 6 + name = "aho-corasick" 7 + version = "1.1.4" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" 10 + dependencies = [ 11 + "memchr", 12 + ] 13 + 14 + [[package]] 15 + name = "android_system_properties" 16 + version = "0.1.5" 17 + source = "registry+https://github.com/rust-lang/crates.io-index" 18 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 19 + dependencies = [ 20 + "libc", 21 + ] 22 + 23 + [[package]] 24 + name = "ansi_term" 25 + version = "0.12.1" 26 + source = "registry+https://github.com/rust-lang/crates.io-index" 27 + checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 28 + dependencies = [ 29 + "winapi", 30 + ] 31 + 32 + [[package]] 33 + name = "anstream" 34 + version = "1.0.0" 35 + source = "registry+https://github.com/rust-lang/crates.io-index" 36 + checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" 37 + dependencies = [ 38 + "anstyle", 39 + "anstyle-parse", 40 + "anstyle-query", 41 + "anstyle-wincon", 42 + "colorchoice", 43 + "is_terminal_polyfill", 44 + "utf8parse", 45 + ] 46 + 47 + [[package]] 48 + name = "anstyle" 49 + version = "1.0.14" 50 + source = "registry+https://github.com/rust-lang/crates.io-index" 51 + checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" 52 + 53 + [[package]] 54 + name = "anstyle-parse" 55 + version = "1.0.0" 56 + source = "registry+https://github.com/rust-lang/crates.io-index" 57 + checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" 58 + dependencies = [ 59 + "utf8parse", 60 + ] 61 + 62 + [[package]] 63 + name = "anstyle-query" 64 + version = "1.1.5" 65 + source = "registry+https://github.com/rust-lang/crates.io-index" 66 + checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" 67 + dependencies = [ 68 + "windows-sys", 69 + ] 70 + 71 + [[package]] 72 + name = "anstyle-wincon" 73 + version = "3.0.11" 74 + source = "registry+https://github.com/rust-lang/crates.io-index" 75 + checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" 76 + dependencies = [ 77 + "anstyle", 78 + "once_cell_polyfill", 79 + "windows-sys", 80 + ] 81 + 82 + [[package]] 83 + name = "atomic-waker" 84 + version = "1.1.2" 85 + source = "registry+https://github.com/rust-lang/crates.io-index" 86 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 87 + 88 + [[package]] 89 + name = "autocfg" 90 + version = "1.5.0" 91 + source = "registry+https://github.com/rust-lang/crates.io-index" 92 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 93 + 94 + [[package]] 95 + name = "axum" 96 + version = "0.8.9" 97 + source = "registry+https://github.com/rust-lang/crates.io-index" 98 + checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" 99 + dependencies = [ 100 + "axum-core", 101 + "axum-macros", 102 + "bytes", 103 + "form_urlencoded", 104 + "futures-util", 105 + "http", 106 + "http-body", 107 + "http-body-util", 108 + "hyper", 109 + "hyper-util", 110 + "itoa", 111 + "matchit", 112 + "memchr", 113 + "mime", 114 + "percent-encoding", 115 + "pin-project-lite", 116 + "serde_core", 117 + "serde_json", 118 + "serde_path_to_error", 119 + "serde_urlencoded", 120 + "sync_wrapper", 121 + "tokio", 122 + "tower", 123 + "tower-layer", 124 + "tower-service", 125 + "tracing", 126 + ] 127 + 128 + [[package]] 129 + name = "axum-core" 130 + version = "0.5.6" 131 + source = "registry+https://github.com/rust-lang/crates.io-index" 132 + checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" 133 + dependencies = [ 134 + "bytes", 135 + "futures-core", 136 + "http", 137 + "http-body", 138 + "http-body-util", 139 + "mime", 140 + "pin-project-lite", 141 + "sync_wrapper", 142 + "tower-layer", 143 + "tower-service", 144 + "tracing", 145 + ] 146 + 147 + [[package]] 148 + name = "axum-macros" 149 + version = "0.5.1" 150 + source = "registry+https://github.com/rust-lang/crates.io-index" 151 + checksum = "7aa268c23bfbbd2c4363b9cd302a4f504fb2a9dfe7e3451d66f35dd392e20aca" 152 + dependencies = [ 153 + "proc-macro2", 154 + "quote", 155 + "syn", 156 + ] 157 + 158 + [[package]] 159 + name = "bumpalo" 160 + version = "3.20.2" 161 + source = "registry+https://github.com/rust-lang/crates.io-index" 162 + checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" 163 + 164 + [[package]] 165 + name = "bytes" 166 + version = "1.11.1" 167 + source = "registry+https://github.com/rust-lang/crates.io-index" 168 + checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" 169 + 170 + [[package]] 171 + name = "cc" 172 + version = "1.2.60" 173 + source = "registry+https://github.com/rust-lang/crates.io-index" 174 + checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" 175 + dependencies = [ 176 + "find-msvc-tools", 177 + "shlex", 178 + ] 179 + 180 + [[package]] 181 + name = "cfg-if" 182 + version = "1.0.4" 183 + source = "registry+https://github.com/rust-lang/crates.io-index" 184 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 185 + 186 + [[package]] 187 + name = "chrono" 188 + version = "0.4.44" 189 + source = "registry+https://github.com/rust-lang/crates.io-index" 190 + checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" 191 + dependencies = [ 192 + "iana-time-zone", 193 + "num-traits", 194 + "windows-link", 195 + ] 196 + 197 + [[package]] 198 + name = "clap" 199 + version = "4.6.1" 200 + source = "registry+https://github.com/rust-lang/crates.io-index" 201 + checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" 202 + dependencies = [ 203 + "clap_builder", 204 + "clap_derive", 205 + ] 206 + 207 + [[package]] 208 + name = "clap_builder" 209 + version = "4.6.0" 210 + source = "registry+https://github.com/rust-lang/crates.io-index" 211 + checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" 212 + dependencies = [ 213 + "anstream", 214 + "anstyle", 215 + "clap_lex", 216 + "strsim", 217 + ] 218 + 219 + [[package]] 220 + name = "clap_derive" 221 + version = "4.6.1" 222 + source = "registry+https://github.com/rust-lang/crates.io-index" 223 + checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" 224 + dependencies = [ 225 + "heck", 226 + "proc-macro2", 227 + "quote", 228 + "syn", 229 + ] 230 + 231 + [[package]] 232 + name = "clap_lex" 233 + version = "1.1.0" 234 + source = "registry+https://github.com/rust-lang/crates.io-index" 235 + checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" 236 + 237 + [[package]] 238 + name = "colorchoice" 239 + version = "1.0.5" 240 + source = "registry+https://github.com/rust-lang/crates.io-index" 241 + checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" 242 + 243 + [[package]] 244 + name = "confique" 245 + version = "0.4.0" 246 + source = "registry+https://github.com/rust-lang/crates.io-index" 247 + checksum = "06b4f5ec222421e22bb0a8cbaa36b1d2b50fd45cdd30c915ded34108da78b29f" 248 + dependencies = [ 249 + "confique-macro", 250 + "serde", 251 + "toml", 252 + ] 253 + 254 + [[package]] 255 + name = "confique-macro" 256 + version = "0.0.13" 257 + source = "registry+https://github.com/rust-lang/crates.io-index" 258 + checksum = "e4d1754680cd218e7bcb4c960cc9bae3444b5197d64563dccccfdf83cab9e1a7" 259 + dependencies = [ 260 + "heck", 261 + "proc-macro2", 262 + "quote", 263 + "syn", 264 + ] 265 + 266 + [[package]] 267 + name = "core-foundation-sys" 268 + version = "0.8.7" 269 + source = "registry+https://github.com/rust-lang/crates.io-index" 270 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 271 + 272 + [[package]] 273 + name = "equivalent" 274 + version = "1.0.2" 275 + source = "registry+https://github.com/rust-lang/crates.io-index" 276 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 277 + 278 + [[package]] 279 + name = "errno" 280 + version = "0.3.14" 281 + source = "registry+https://github.com/rust-lang/crates.io-index" 282 + checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" 283 + dependencies = [ 284 + "libc", 285 + "windows-sys", 286 + ] 287 + 288 + [[package]] 289 + name = "find-msvc-tools" 290 + version = "0.1.9" 291 + source = "registry+https://github.com/rust-lang/crates.io-index" 292 + checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" 293 + 294 + [[package]] 295 + name = "form_urlencoded" 296 + version = "1.2.2" 297 + source = "registry+https://github.com/rust-lang/crates.io-index" 298 + checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" 299 + dependencies = [ 300 + "percent-encoding", 301 + ] 302 + 303 + [[package]] 304 + name = "futures-channel" 305 + version = "0.3.32" 306 + source = "registry+https://github.com/rust-lang/crates.io-index" 307 + checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" 308 + dependencies = [ 309 + "futures-core", 310 + ] 311 + 312 + [[package]] 313 + name = "futures-core" 314 + version = "0.3.32" 315 + source = "registry+https://github.com/rust-lang/crates.io-index" 316 + checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" 317 + 318 + [[package]] 319 + name = "futures-sink" 320 + version = "0.3.32" 321 + source = "registry+https://github.com/rust-lang/crates.io-index" 322 + checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" 323 + 324 + [[package]] 325 + name = "futures-task" 326 + version = "0.3.32" 327 + source = "registry+https://github.com/rust-lang/crates.io-index" 328 + checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" 329 + 330 + [[package]] 331 + name = "futures-util" 332 + version = "0.3.32" 333 + source = "registry+https://github.com/rust-lang/crates.io-index" 334 + checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" 335 + dependencies = [ 336 + "futures-core", 337 + "futures-task", 338 + "pin-project-lite", 339 + "slab", 340 + ] 341 + 342 + [[package]] 343 + name = "hashbrown" 344 + version = "0.17.0" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" 347 + 348 + [[package]] 349 + name = "heck" 350 + version = "0.5.0" 351 + source = "registry+https://github.com/rust-lang/crates.io-index" 352 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 353 + 354 + [[package]] 355 + name = "http" 356 + version = "1.4.0" 357 + source = "registry+https://github.com/rust-lang/crates.io-index" 358 + checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" 359 + dependencies = [ 360 + "bytes", 361 + "itoa", 362 + ] 363 + 364 + [[package]] 365 + name = "http-body" 366 + version = "1.0.1" 367 + source = "registry+https://github.com/rust-lang/crates.io-index" 368 + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 369 + dependencies = [ 370 + "bytes", 371 + "http", 372 + ] 373 + 374 + [[package]] 375 + name = "http-body-util" 376 + version = "0.1.3" 377 + source = "registry+https://github.com/rust-lang/crates.io-index" 378 + checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 379 + dependencies = [ 380 + "bytes", 381 + "futures-core", 382 + "http", 383 + "http-body", 384 + "pin-project-lite", 385 + ] 386 + 387 + [[package]] 388 + name = "httparse" 389 + version = "1.10.1" 390 + source = "registry+https://github.com/rust-lang/crates.io-index" 391 + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 392 + 393 + [[package]] 394 + name = "httpdate" 395 + version = "1.0.3" 396 + source = "registry+https://github.com/rust-lang/crates.io-index" 397 + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 398 + 399 + [[package]] 400 + name = "hyper" 401 + version = "1.9.0" 402 + source = "registry+https://github.com/rust-lang/crates.io-index" 403 + checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" 404 + dependencies = [ 405 + "atomic-waker", 406 + "bytes", 407 + "futures-channel", 408 + "futures-core", 409 + "http", 410 + "http-body", 411 + "httparse", 412 + "httpdate", 413 + "itoa", 414 + "pin-project-lite", 415 + "smallvec", 416 + "tokio", 417 + ] 418 + 419 + [[package]] 420 + name = "hyper-util" 421 + version = "0.1.20" 422 + source = "registry+https://github.com/rust-lang/crates.io-index" 423 + checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" 424 + dependencies = [ 425 + "bytes", 426 + "http", 427 + "http-body", 428 + "hyper", 429 + "pin-project-lite", 430 + "tokio", 431 + "tower-service", 432 + ] 433 + 434 + [[package]] 435 + name = "iana-time-zone" 436 + version = "0.1.65" 437 + source = "registry+https://github.com/rust-lang/crates.io-index" 438 + checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" 439 + dependencies = [ 440 + "android_system_properties", 441 + "core-foundation-sys", 442 + "iana-time-zone-haiku", 443 + "js-sys", 444 + "log", 445 + "wasm-bindgen", 446 + "windows-core", 447 + ] 448 + 449 + [[package]] 450 + name = "iana-time-zone-haiku" 451 + version = "0.1.2" 452 + source = "registry+https://github.com/rust-lang/crates.io-index" 453 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 454 + dependencies = [ 455 + "cc", 456 + ] 457 + 458 + [[package]] 459 + name = "indexmap" 460 + version = "2.14.0" 461 + source = "registry+https://github.com/rust-lang/crates.io-index" 462 + checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" 463 + dependencies = [ 464 + "equivalent", 465 + "hashbrown", 466 + ] 467 + 468 + [[package]] 469 + name = "is_terminal_polyfill" 470 + version = "1.70.2" 471 + source = "registry+https://github.com/rust-lang/crates.io-index" 472 + checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" 473 + 474 + [[package]] 475 + name = "itoa" 476 + version = "1.0.18" 477 + source = "registry+https://github.com/rust-lang/crates.io-index" 478 + checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" 479 + 480 + [[package]] 481 + name = "js-sys" 482 + version = "0.3.95" 483 + source = "registry+https://github.com/rust-lang/crates.io-index" 484 + checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" 485 + dependencies = [ 486 + "once_cell", 487 + "wasm-bindgen", 488 + ] 489 + 490 + [[package]] 491 + name = "lazy_static" 492 + version = "1.5.0" 493 + source = "registry+https://github.com/rust-lang/crates.io-index" 494 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 495 + 496 + [[package]] 497 + name = "libc" 498 + version = "0.2.185" 499 + source = "registry+https://github.com/rust-lang/crates.io-index" 500 + checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" 501 + 502 + [[package]] 503 + name = "log" 504 + version = "0.4.29" 505 + source = "registry+https://github.com/rust-lang/crates.io-index" 506 + checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 507 + 508 + [[package]] 6 509 name = "lucid-api" 7 510 version = "0.1.0-alpha.0" 511 + dependencies = [ 512 + "axum", 513 + "tokio-util", 514 + ] 8 515 9 516 [[package]] 10 517 name = "lucid-auth" ··· 13 520 [[package]] 14 521 name = "lucid-core" 15 522 version = "0.1.0-alpha.0" 523 + dependencies = [ 524 + "confique", 525 + ] 16 526 17 527 [[package]] 18 528 name = "lucid-database" ··· 21 531 [[package]] 22 532 name = "lucid-server" 23 533 version = "0.1.0-alpha.0" 534 + dependencies = [ 535 + "axum", 536 + "clap", 537 + "lucid-api", 538 + "lucid-core", 539 + "tokio", 540 + "tokio-util", 541 + "tracing", 542 + "tracing-subscriber", 543 + ] 544 + 545 + [[package]] 546 + name = "matchers" 547 + version = "0.0.1" 548 + source = "registry+https://github.com/rust-lang/crates.io-index" 549 + checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" 550 + dependencies = [ 551 + "regex-automata 0.1.10", 552 + ] 553 + 554 + [[package]] 555 + name = "matchit" 556 + version = "0.8.4" 557 + source = "registry+https://github.com/rust-lang/crates.io-index" 558 + checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 559 + 560 + [[package]] 561 + name = "memchr" 562 + version = "2.8.0" 563 + source = "registry+https://github.com/rust-lang/crates.io-index" 564 + checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" 565 + 566 + [[package]] 567 + name = "mime" 568 + version = "0.3.17" 569 + source = "registry+https://github.com/rust-lang/crates.io-index" 570 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 571 + 572 + [[package]] 573 + name = "mio" 574 + version = "1.2.0" 575 + source = "registry+https://github.com/rust-lang/crates.io-index" 576 + checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" 577 + dependencies = [ 578 + "libc", 579 + "wasi", 580 + "windows-sys", 581 + ] 582 + 583 + [[package]] 584 + name = "num-traits" 585 + version = "0.2.19" 586 + source = "registry+https://github.com/rust-lang/crates.io-index" 587 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 588 + dependencies = [ 589 + "autocfg", 590 + ] 591 + 592 + [[package]] 593 + name = "once_cell" 594 + version = "1.21.4" 595 + source = "registry+https://github.com/rust-lang/crates.io-index" 596 + checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" 597 + 598 + [[package]] 599 + name = "once_cell_polyfill" 600 + version = "1.70.2" 601 + source = "registry+https://github.com/rust-lang/crates.io-index" 602 + checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" 603 + 604 + [[package]] 605 + name = "percent-encoding" 606 + version = "2.3.2" 607 + source = "registry+https://github.com/rust-lang/crates.io-index" 608 + checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 609 + 610 + [[package]] 611 + name = "pin-project-lite" 612 + version = "0.2.17" 613 + source = "registry+https://github.com/rust-lang/crates.io-index" 614 + checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" 615 + 616 + [[package]] 617 + name = "proc-macro2" 618 + version = "1.0.106" 619 + source = "registry+https://github.com/rust-lang/crates.io-index" 620 + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" 621 + dependencies = [ 622 + "unicode-ident", 623 + ] 624 + 625 + [[package]] 626 + name = "quote" 627 + version = "1.0.45" 628 + source = "registry+https://github.com/rust-lang/crates.io-index" 629 + checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" 630 + dependencies = [ 631 + "proc-macro2", 632 + ] 633 + 634 + [[package]] 635 + name = "regex" 636 + version = "1.12.3" 637 + source = "registry+https://github.com/rust-lang/crates.io-index" 638 + checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" 639 + dependencies = [ 640 + "aho-corasick", 641 + "memchr", 642 + "regex-automata 0.4.14", 643 + "regex-syntax 0.8.10", 644 + ] 645 + 646 + [[package]] 647 + name = "regex-automata" 648 + version = "0.1.10" 649 + source = "registry+https://github.com/rust-lang/crates.io-index" 650 + checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 651 + dependencies = [ 652 + "regex-syntax 0.6.29", 653 + ] 654 + 655 + [[package]] 656 + name = "regex-automata" 657 + version = "0.4.14" 658 + source = "registry+https://github.com/rust-lang/crates.io-index" 659 + checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" 660 + dependencies = [ 661 + "aho-corasick", 662 + "memchr", 663 + "regex-syntax 0.8.10", 664 + ] 665 + 666 + [[package]] 667 + name = "regex-syntax" 668 + version = "0.6.29" 669 + source = "registry+https://github.com/rust-lang/crates.io-index" 670 + checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 671 + 672 + [[package]] 673 + name = "regex-syntax" 674 + version = "0.8.10" 675 + source = "registry+https://github.com/rust-lang/crates.io-index" 676 + checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" 677 + 678 + [[package]] 679 + name = "rustversion" 680 + version = "1.0.22" 681 + source = "registry+https://github.com/rust-lang/crates.io-index" 682 + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 683 + 684 + [[package]] 685 + name = "ryu" 686 + version = "1.0.23" 687 + source = "registry+https://github.com/rust-lang/crates.io-index" 688 + checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" 689 + 690 + [[package]] 691 + name = "serde" 692 + version = "1.0.228" 693 + source = "registry+https://github.com/rust-lang/crates.io-index" 694 + checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 695 + dependencies = [ 696 + "serde_core", 697 + "serde_derive", 698 + ] 699 + 700 + [[package]] 701 + name = "serde_core" 702 + version = "1.0.228" 703 + source = "registry+https://github.com/rust-lang/crates.io-index" 704 + checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" 705 + dependencies = [ 706 + "serde_derive", 707 + ] 708 + 709 + [[package]] 710 + name = "serde_derive" 711 + version = "1.0.228" 712 + source = "registry+https://github.com/rust-lang/crates.io-index" 713 + checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" 714 + dependencies = [ 715 + "proc-macro2", 716 + "quote", 717 + "syn", 718 + ] 719 + 720 + [[package]] 721 + name = "serde_json" 722 + version = "1.0.149" 723 + source = "registry+https://github.com/rust-lang/crates.io-index" 724 + checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" 725 + dependencies = [ 726 + "itoa", 727 + "memchr", 728 + "serde", 729 + "serde_core", 730 + "zmij", 731 + ] 732 + 733 + [[package]] 734 + name = "serde_path_to_error" 735 + version = "0.1.20" 736 + source = "registry+https://github.com/rust-lang/crates.io-index" 737 + checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" 738 + dependencies = [ 739 + "itoa", 740 + "serde", 741 + "serde_core", 742 + ] 743 + 744 + [[package]] 745 + name = "serde_spanned" 746 + version = "1.1.1" 747 + source = "registry+https://github.com/rust-lang/crates.io-index" 748 + checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" 749 + dependencies = [ 750 + "serde_core", 751 + ] 752 + 753 + [[package]] 754 + name = "serde_urlencoded" 755 + version = "0.7.1" 756 + source = "registry+https://github.com/rust-lang/crates.io-index" 757 + checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 758 + dependencies = [ 759 + "form_urlencoded", 760 + "itoa", 761 + "ryu", 762 + "serde", 763 + ] 764 + 765 + [[package]] 766 + name = "sharded-slab" 767 + version = "0.1.7" 768 + source = "registry+https://github.com/rust-lang/crates.io-index" 769 + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 770 + dependencies = [ 771 + "lazy_static", 772 + ] 773 + 774 + [[package]] 775 + name = "shlex" 776 + version = "1.3.0" 777 + source = "registry+https://github.com/rust-lang/crates.io-index" 778 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 779 + 780 + [[package]] 781 + name = "signal-hook-registry" 782 + version = "1.4.8" 783 + source = "registry+https://github.com/rust-lang/crates.io-index" 784 + checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" 785 + dependencies = [ 786 + "errno", 787 + "libc", 788 + ] 789 + 790 + [[package]] 791 + name = "slab" 792 + version = "0.4.12" 793 + source = "registry+https://github.com/rust-lang/crates.io-index" 794 + checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" 795 + 796 + [[package]] 797 + name = "smallvec" 798 + version = "1.15.1" 799 + source = "registry+https://github.com/rust-lang/crates.io-index" 800 + checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 801 + 802 + [[package]] 803 + name = "socket2" 804 + version = "0.6.3" 805 + source = "registry+https://github.com/rust-lang/crates.io-index" 806 + checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" 807 + dependencies = [ 808 + "libc", 809 + "windows-sys", 810 + ] 811 + 812 + [[package]] 813 + name = "strsim" 814 + version = "0.11.1" 815 + source = "registry+https://github.com/rust-lang/crates.io-index" 816 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 817 + 818 + [[package]] 819 + name = "syn" 820 + version = "2.0.117" 821 + source = "registry+https://github.com/rust-lang/crates.io-index" 822 + checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" 823 + dependencies = [ 824 + "proc-macro2", 825 + "quote", 826 + "unicode-ident", 827 + ] 828 + 829 + [[package]] 830 + name = "sync_wrapper" 831 + version = "1.0.2" 832 + source = "registry+https://github.com/rust-lang/crates.io-index" 833 + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 834 + 835 + [[package]] 836 + name = "thread_local" 837 + version = "1.1.9" 838 + source = "registry+https://github.com/rust-lang/crates.io-index" 839 + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 840 + dependencies = [ 841 + "cfg-if", 842 + ] 843 + 844 + [[package]] 845 + name = "tokio" 846 + version = "1.52.1" 847 + source = "registry+https://github.com/rust-lang/crates.io-index" 848 + checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" 849 + dependencies = [ 850 + "libc", 851 + "mio", 852 + "pin-project-lite", 853 + "signal-hook-registry", 854 + "socket2", 855 + "tokio-macros", 856 + "windows-sys", 857 + ] 858 + 859 + [[package]] 860 + name = "tokio-macros" 861 + version = "2.7.0" 862 + source = "registry+https://github.com/rust-lang/crates.io-index" 863 + checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" 864 + dependencies = [ 865 + "proc-macro2", 866 + "quote", 867 + "syn", 868 + ] 869 + 870 + [[package]] 871 + name = "tokio-util" 872 + version = "0.7.18" 873 + source = "registry+https://github.com/rust-lang/crates.io-index" 874 + checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" 875 + dependencies = [ 876 + "bytes", 877 + "futures-core", 878 + "futures-sink", 879 + "pin-project-lite", 880 + "tokio", 881 + ] 882 + 883 + [[package]] 884 + name = "toml" 885 + version = "0.9.12+spec-1.1.0" 886 + source = "registry+https://github.com/rust-lang/crates.io-index" 887 + checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" 888 + dependencies = [ 889 + "indexmap", 890 + "serde_core", 891 + "serde_spanned", 892 + "toml_datetime", 893 + "toml_parser", 894 + "toml_writer", 895 + "winnow 0.7.15", 896 + ] 897 + 898 + [[package]] 899 + name = "toml_datetime" 900 + version = "0.7.5+spec-1.1.0" 901 + source = "registry+https://github.com/rust-lang/crates.io-index" 902 + checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" 903 + dependencies = [ 904 + "serde_core", 905 + ] 906 + 907 + [[package]] 908 + name = "toml_parser" 909 + version = "1.1.2+spec-1.1.0" 910 + source = "registry+https://github.com/rust-lang/crates.io-index" 911 + checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" 912 + dependencies = [ 913 + "winnow 1.0.1", 914 + ] 915 + 916 + [[package]] 917 + name = "toml_writer" 918 + version = "1.1.1+spec-1.1.0" 919 + source = "registry+https://github.com/rust-lang/crates.io-index" 920 + checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" 921 + 922 + [[package]] 923 + name = "tower" 924 + version = "0.5.3" 925 + source = "registry+https://github.com/rust-lang/crates.io-index" 926 + checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" 927 + dependencies = [ 928 + "futures-core", 929 + "futures-util", 930 + "pin-project-lite", 931 + "sync_wrapper", 932 + "tokio", 933 + "tower-layer", 934 + "tower-service", 935 + "tracing", 936 + ] 937 + 938 + [[package]] 939 + name = "tower-layer" 940 + version = "0.3.3" 941 + source = "registry+https://github.com/rust-lang/crates.io-index" 942 + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 943 + 944 + [[package]] 945 + name = "tower-service" 946 + version = "0.3.3" 947 + source = "registry+https://github.com/rust-lang/crates.io-index" 948 + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 949 + 950 + [[package]] 951 + name = "tracing" 952 + version = "0.1.44" 953 + source = "registry+https://github.com/rust-lang/crates.io-index" 954 + checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" 955 + dependencies = [ 956 + "log", 957 + "pin-project-lite", 958 + "tracing-attributes", 959 + "tracing-core", 960 + ] 961 + 962 + [[package]] 963 + name = "tracing-attributes" 964 + version = "0.1.31" 965 + source = "registry+https://github.com/rust-lang/crates.io-index" 966 + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" 967 + dependencies = [ 968 + "proc-macro2", 969 + "quote", 970 + "syn", 971 + ] 972 + 973 + [[package]] 974 + name = "tracing-core" 975 + version = "0.1.36" 976 + source = "registry+https://github.com/rust-lang/crates.io-index" 977 + checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" 978 + dependencies = [ 979 + "once_cell", 980 + "valuable", 981 + ] 982 + 983 + [[package]] 984 + name = "tracing-log" 985 + version = "0.1.4" 986 + source = "registry+https://github.com/rust-lang/crates.io-index" 987 + checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" 988 + dependencies = [ 989 + "log", 990 + "once_cell", 991 + "tracing-core", 992 + ] 993 + 994 + [[package]] 995 + name = "tracing-serde" 996 + version = "0.1.3" 997 + source = "registry+https://github.com/rust-lang/crates.io-index" 998 + checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" 999 + dependencies = [ 1000 + "serde", 1001 + "tracing-core", 1002 + ] 1003 + 1004 + [[package]] 1005 + name = "tracing-subscriber" 1006 + version = "0.2.25" 1007 + source = "registry+https://github.com/rust-lang/crates.io-index" 1008 + checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" 1009 + dependencies = [ 1010 + "ansi_term", 1011 + "chrono", 1012 + "lazy_static", 1013 + "matchers", 1014 + "regex", 1015 + "serde", 1016 + "serde_json", 1017 + "sharded-slab", 1018 + "smallvec", 1019 + "thread_local", 1020 + "tracing", 1021 + "tracing-core", 1022 + "tracing-log", 1023 + "tracing-serde", 1024 + ] 1025 + 1026 + [[package]] 1027 + name = "unicode-ident" 1028 + version = "1.0.24" 1029 + source = "registry+https://github.com/rust-lang/crates.io-index" 1030 + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" 1031 + 1032 + [[package]] 1033 + name = "utf8parse" 1034 + version = "0.2.2" 1035 + source = "registry+https://github.com/rust-lang/crates.io-index" 1036 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1037 + 1038 + [[package]] 1039 + name = "valuable" 1040 + version = "0.1.1" 1041 + source = "registry+https://github.com/rust-lang/crates.io-index" 1042 + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 1043 + 1044 + [[package]] 1045 + name = "wasi" 1046 + version = "0.11.1+wasi-snapshot-preview1" 1047 + source = "registry+https://github.com/rust-lang/crates.io-index" 1048 + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 1049 + 1050 + [[package]] 1051 + name = "wasm-bindgen" 1052 + version = "0.2.118" 1053 + source = "registry+https://github.com/rust-lang/crates.io-index" 1054 + checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" 1055 + dependencies = [ 1056 + "cfg-if", 1057 + "once_cell", 1058 + "rustversion", 1059 + "wasm-bindgen-macro", 1060 + "wasm-bindgen-shared", 1061 + ] 1062 + 1063 + [[package]] 1064 + name = "wasm-bindgen-macro" 1065 + version = "0.2.118" 1066 + source = "registry+https://github.com/rust-lang/crates.io-index" 1067 + checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" 1068 + dependencies = [ 1069 + "quote", 1070 + "wasm-bindgen-macro-support", 1071 + ] 1072 + 1073 + [[package]] 1074 + name = "wasm-bindgen-macro-support" 1075 + version = "0.2.118" 1076 + source = "registry+https://github.com/rust-lang/crates.io-index" 1077 + checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" 1078 + dependencies = [ 1079 + "bumpalo", 1080 + "proc-macro2", 1081 + "quote", 1082 + "syn", 1083 + "wasm-bindgen-shared", 1084 + ] 1085 + 1086 + [[package]] 1087 + name = "wasm-bindgen-shared" 1088 + version = "0.2.118" 1089 + source = "registry+https://github.com/rust-lang/crates.io-index" 1090 + checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" 1091 + dependencies = [ 1092 + "unicode-ident", 1093 + ] 1094 + 1095 + [[package]] 1096 + name = "winapi" 1097 + version = "0.3.9" 1098 + source = "registry+https://github.com/rust-lang/crates.io-index" 1099 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1100 + dependencies = [ 1101 + "winapi-i686-pc-windows-gnu", 1102 + "winapi-x86_64-pc-windows-gnu", 1103 + ] 1104 + 1105 + [[package]] 1106 + name = "winapi-i686-pc-windows-gnu" 1107 + version = "0.4.0" 1108 + source = "registry+https://github.com/rust-lang/crates.io-index" 1109 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1110 + 1111 + [[package]] 1112 + name = "winapi-x86_64-pc-windows-gnu" 1113 + version = "0.4.0" 1114 + source = "registry+https://github.com/rust-lang/crates.io-index" 1115 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1116 + 1117 + [[package]] 1118 + name = "windows-core" 1119 + version = "0.62.2" 1120 + source = "registry+https://github.com/rust-lang/crates.io-index" 1121 + checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" 1122 + dependencies = [ 1123 + "windows-implement", 1124 + "windows-interface", 1125 + "windows-link", 1126 + "windows-result", 1127 + "windows-strings", 1128 + ] 1129 + 1130 + [[package]] 1131 + name = "windows-implement" 1132 + version = "0.60.2" 1133 + source = "registry+https://github.com/rust-lang/crates.io-index" 1134 + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" 1135 + dependencies = [ 1136 + "proc-macro2", 1137 + "quote", 1138 + "syn", 1139 + ] 1140 + 1141 + [[package]] 1142 + name = "windows-interface" 1143 + version = "0.59.3" 1144 + source = "registry+https://github.com/rust-lang/crates.io-index" 1145 + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" 1146 + dependencies = [ 1147 + "proc-macro2", 1148 + "quote", 1149 + "syn", 1150 + ] 1151 + 1152 + [[package]] 1153 + name = "windows-link" 1154 + version = "0.2.1" 1155 + source = "registry+https://github.com/rust-lang/crates.io-index" 1156 + checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 1157 + 1158 + [[package]] 1159 + name = "windows-result" 1160 + version = "0.4.1" 1161 + source = "registry+https://github.com/rust-lang/crates.io-index" 1162 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 1163 + dependencies = [ 1164 + "windows-link", 1165 + ] 1166 + 1167 + [[package]] 1168 + name = "windows-strings" 1169 + version = "0.5.1" 1170 + source = "registry+https://github.com/rust-lang/crates.io-index" 1171 + checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" 1172 + dependencies = [ 1173 + "windows-link", 1174 + ] 1175 + 1176 + [[package]] 1177 + name = "windows-sys" 1178 + version = "0.61.2" 1179 + source = "registry+https://github.com/rust-lang/crates.io-index" 1180 + checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" 1181 + dependencies = [ 1182 + "windows-link", 1183 + ] 1184 + 1185 + [[package]] 1186 + name = "winnow" 1187 + version = "0.7.15" 1188 + source = "registry+https://github.com/rust-lang/crates.io-index" 1189 + checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" 1190 + 1191 + [[package]] 1192 + name = "winnow" 1193 + version = "1.0.1" 1194 + source = "registry+https://github.com/rust-lang/crates.io-index" 1195 + checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" 1196 + 1197 + [[package]] 1198 + name = "zmij" 1199 + version = "1.0.21" 1200 + source = "registry+https://github.com/rust-lang/crates.io-index" 1201 + checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+13
Cargo.toml
··· 23 23 24 24 lucid-server = { path = "crates/server" } 25 25 26 + anyhow = "1.0" 27 + axum = { version = "0.8", features = ["macros"] } 28 + clap = { version = "4", features = ["derive", "env"] } 29 + confique = { version = "0.4", features = ["toml"] } 30 + http = "1.4" 31 + serde = { version = "1.0", features = ["derive"] } 32 + serde_json = "1.0" 33 + thiserror = "2.0" 34 + tokio = { version = "1.48", features = ["macros", "rt-multi-thread", "signal"] } 35 + tokio-util = "0.7" 36 + tracing = "0.1" 37 + tracing-subscriber = "0.2" 38 + 26 39 [profile.release] 27 40 lto = "fat" 28 41 strip = true
+2
crates/api/Cargo.toml
··· 5 5 license.workspace = true 6 6 7 7 [dependencies] 8 + axum.workspace = true 9 + tokio-util.workspace = true
+26
crates/api/build.rs
··· 1 + use std::process::Command; 2 + 3 + fn main() { 4 + let timestamp = Command::new("date") 5 + .arg("+%Y-%m-%d %H:%M:%S UTC") 6 + .output() 7 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 8 + .unwrap_or_else(|_| "unknown".to_string()); 9 + 10 + let git_sha = Command::new("git") 11 + .args(["rev-parse", "HEAD"]) 12 + .output() 13 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 14 + .unwrap_or_else(|_| "unknown".to_string()); 15 + 16 + let git_branch = Command::new("git") 17 + .args(["rev-parse", "--abbrev-ref", "HEAD"]) 18 + .output() 19 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 20 + .unwrap_or_else(|_| "unknown".to_string()); 21 + 22 + println!("cargo:rustc-env=BUILD_TIMESTAMP={}", timestamp); 23 + println!("cargo:rustc-env=BUILD_GIT_SHA={}", git_sha); 24 + println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); 25 + println!("cargo:rerun-if-changed=build.rs"); 26 + }
+9 -11
crates/api/src/lib.rs
··· 1 - pub fn add(left: u64, right: u64) -> u64 { 2 - left + right 3 - } 1 + pub mod state; 4 2 5 - #[cfg(test)] 6 - mod tests { 7 - use super::*; 3 + use axum::Router; 8 4 9 - #[test] 10 - fn it_works() { 11 - let result = add(2, 2); 12 - assert_eq!(result, 4); 13 - } 5 + use crate::state::AppState; 6 + 7 + pub fn app(state: AppState) -> Router { 8 + let router = Router::new() 9 + .with_state(state); 10 + 11 + router 14 12 }
+14
crates/api/src/state.rs
··· 1 + use std::error::Error; 2 + 3 + use tokio_util::sync::CancellationToken; 4 + 5 + #[derive(Clone)] 6 + pub struct AppState { 7 + pub shutdown: CancellationToken, 8 + } 9 + 10 + impl AppState { 11 + pub async fn new(shutdown: CancellationToken) -> Result<Self, Box<dyn Error>> { 12 + Ok(Self { shutdown }) 13 + } 14 + }
+1
crates/core/Cargo.toml
··· 5 5 license.workspace = true 6 6 7 7 [dependencies] 8 + confique.workspace = true
+26
crates/core/auth/build.rs
··· 1 + use std::process::Command; 2 + 3 + fn main() { 4 + let timestamp = Command::new("date") 5 + .arg("+%Y-%m-%d %H:%M:%S UTC") 6 + .output() 7 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 8 + .unwrap_or_else(|_| "unknown".to_string()); 9 + 10 + let git_sha = Command::new("git") 11 + .args(["rev-parse", "HEAD"]) 12 + .output() 13 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 14 + .unwrap_or_else(|_| "unknown".to_string()); 15 + 16 + let git_branch = Command::new("git") 17 + .args(["rev-parse", "--abbrev-ref", "HEAD"]) 18 + .output() 19 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 20 + .unwrap_or_else(|_| "unknown".to_string()); 21 + 22 + println!("cargo:rustc-env=BUILD_TIMESTAMP={}", timestamp); 23 + println!("cargo:rustc-env=BUILD_GIT_SHA={}", git_sha); 24 + println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); 25 + println!("cargo:rerun-if-changed=build.rs"); 26 + }
+26
crates/core/build.rs
··· 1 + use std::process::Command; 2 + 3 + fn main() { 4 + let timestamp = Command::new("date") 5 + .arg("+%Y-%m-%d %H:%M:%S UTC") 6 + .output() 7 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 8 + .unwrap_or_else(|_| "unknown".to_string()); 9 + 10 + let git_sha = Command::new("git") 11 + .args(["rev-parse", "HEAD"]) 12 + .output() 13 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 14 + .unwrap_or_else(|_| "unknown".to_string()); 15 + 16 + let git_branch = Command::new("git") 17 + .args(["rev-parse", "--abbrev-ref", "HEAD"]) 18 + .output() 19 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 20 + .unwrap_or_else(|_| "unknown".to_string()); 21 + 22 + println!("cargo:rustc-env=BUILD_TIMESTAMP={}", timestamp); 23 + println!("cargo:rustc-env=BUILD_GIT_SHA={}", git_sha); 24 + println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); 25 + println!("cargo:rerun-if-changed=build.rs"); 26 + }
+84
crates/core/src/config.rs
··· 1 + use std::{fmt, path::PathBuf, sync::OnceLock}; 2 + 3 + use confique::Config; 4 + 5 + static CONFIG: OnceLock<LucidConfig> = OnceLock::new(); 6 + 7 + /// Errors discovered during configuration validation. 8 + #[derive(Debug)] 9 + pub struct ConfigError { 10 + pub errors: Vec<String>, 11 + } 12 + 13 + impl fmt::Display for ConfigError { 14 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 15 + writeln!(f, "Configuration validation failed with errors:")?; 16 + for err in &self.errors { 17 + writeln!(f, " - {err}")?; 18 + } 19 + Ok(()) 20 + } 21 + } 22 + 23 + impl std::error::Error for ConfigError {} 24 + 25 + /// Initialize the global configuration. Must be called once at startup before 26 + /// any other code accesses the configuration. Panics if called more than once. 27 + pub fn init(config: LucidConfig) { 28 + CONFIG 29 + .set(config) 30 + .expect("Configuration already initialized"); 31 + } 32 + 33 + /// Returns a reference to the global configuration. 34 + /// Panics if [`init`] has not been called yet. 35 + pub fn get() -> &'static LucidConfig { 36 + CONFIG 37 + .get() 38 + .expect("Configuration not initialized - call lucid_core::config::init() first") 39 + } 40 + 41 + /// Returns a reference to the global configuration if it has been initialized. 42 + pub fn try_get() -> Option<&'static LucidConfig> { 43 + CONFIG.get() 44 + } 45 + 46 + /// Load configuration from an optional TOML file path, with environment 47 + /// variable overrides applied on top. Fields annotated with `#[config(env)]` 48 + /// are read from the corresponding environment variables when the `.env()` 49 + /// layer is active. 50 + /// 51 + /// Precedence (highest to lowest): 52 + /// 1. Environment variables 53 + /// 2. TOML config file (if provided) 54 + /// 3. Built-in defaults 55 + pub fn load(config_path: Option<&PathBuf>) -> Result<LucidConfig, confique::Error> { 56 + let mut builder = LucidConfig::builder().env(); 57 + if let Some(path) = config_path { 58 + builder = builder.file(path); 59 + } 60 + builder.file("/etc/lucid/lucidd.toml").load() 61 + } 62 + 63 + #[derive(Debug, Config)] 64 + pub struct LucidConfig { 65 + #[config(nested)] 66 + pub server: ServerConfig, 67 + } 68 + 69 + #[derive(Debug, Config)] 70 + pub struct ServerConfig { 71 + /// Address to bind the HTTP server to. 72 + #[config(env = "LUCID_SERVER_HOST", default = "127.0.0.1")] 73 + pub host: String, 74 + 75 + /// Port to bind the HTTP server to. 76 + #[config(env = "LUCID_SERVER_PORT", default = 8080)] 77 + pub port: u16, 78 + } 79 + 80 + /// Generate a TOML configuration template with all available options, 81 + /// defaults, and documentation comments. 82 + pub fn template() -> String { 83 + confique::toml::template::<LucidConfig>(confique::toml::FormatOptions::default()) 84 + }
+11 -13
crates/core/src/lib.rs
··· 1 - pub fn add(left: u64, right: u64) -> u64 { 2 - left + right 3 - } 4 - 5 - #[cfg(test)] 6 - mod tests { 7 - use super::*; 1 + pub mod config; 8 2 9 - #[test] 10 - fn it_works() { 11 - let result = add(2, 2); 12 - assert_eq!(result, 4); 13 - } 14 - } 3 + pub const BUILD_VERSION: &str = concat!( 4 + env!("CARGO_PKG_VERSION"), 5 + " (rev. ", 6 + env!("BUILD_GIT_SHA"), 7 + "/", 8 + env!("BUILD_GIT_BRANCH"), 9 + " -- built ", 10 + env!("BUILD_TIMESTAMP"), 11 + ")" 12 + );
+26
crates/database/build.rs
··· 1 + use std::process::Command; 2 + 3 + fn main() { 4 + let timestamp = Command::new("date") 5 + .arg("+%Y-%m-%d %H:%M:%S UTC") 6 + .output() 7 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 8 + .unwrap_or_else(|_| "unknown".to_string()); 9 + 10 + let git_sha = Command::new("git") 11 + .args(["rev-parse", "HEAD"]) 12 + .output() 13 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 14 + .unwrap_or_else(|_| "unknown".to_string()); 15 + 16 + let git_branch = Command::new("git") 17 + .args(["rev-parse", "--abbrev-ref", "HEAD"]) 18 + .output() 19 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 20 + .unwrap_or_else(|_| "unknown".to_string()); 21 + 22 + println!("cargo:rustc-env=BUILD_TIMESTAMP={}", timestamp); 23 + println!("cargo:rustc-env=BUILD_GIT_SHA={}", git_sha); 24 + println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); 25 + println!("cargo:rerun-if-changed=build.rs"); 26 + }
+13
crates/server/Cargo.toml
··· 4 4 edition.workspace = true 5 5 license.workspace = true 6 6 7 + [[bin]] 8 + name = "lucidd" 9 + path = "src/main.rs" 10 + 7 11 [dependencies] 12 + lucid-api.workspace = true 13 + lucid-core.workspace = true 14 + 15 + axum.workspace = true 16 + clap.workspace = true 17 + tokio.workspace = true 18 + tokio-util.workspace = true 19 + tracing.workspace = true 20 + tracing-subscriber.workspace = true
+26
crates/server/build.rs
··· 1 + use std::process::Command; 2 + 3 + fn main() { 4 + let timestamp = Command::new("date") 5 + .arg("+%Y-%m-%d %H:%M:%S UTC") 6 + .output() 7 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 8 + .unwrap_or_else(|_| "unknown".to_string()); 9 + 10 + let git_sha = Command::new("git") 11 + .args(["rev-parse", "HEAD"]) 12 + .output() 13 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 14 + .unwrap_or_else(|_| "unknown".to_string()); 15 + 16 + let git_branch = Command::new("git") 17 + .args(["rev-parse", "--abbrev-ref", "HEAD"]) 18 + .output() 19 + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) 20 + .unwrap_or_else(|_| "unknown".to_string()); 21 + 22 + println!("cargo:rustc-env=BUILD_TIMESTAMP={}", timestamp); 23 + println!("cargo:rustc-env=BUILD_GIT_SHA={}", git_sha); 24 + println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch); 25 + println!("cargo:rerun-if-changed=build.rs"); 26 + }
-14
crates/server/src/lib.rs
··· 1 - pub fn add(left: u64, right: u64) -> u64 { 2 - left + right 3 - } 4 - 5 - #[cfg(test)] 6 - mod tests { 7 - use super::*; 8 - 9 - #[test] 10 - fn it_works() { 11 - let result = add(2, 2); 12 - assert_eq!(result, 4); 13 - } 14 - }
+145
crates/server/src/main.rs
··· 1 + use std::{net::SocketAddr, path::PathBuf, process::ExitCode}; 2 + 3 + use clap::{Parser, Subcommand}; 4 + use lucid_api::state::AppState; 5 + use lucid_core::BUILD_VERSION; 6 + use tokio_util::sync::CancellationToken; 7 + use tracing::{error, info}; 8 + 9 + #[derive(Parser)] 10 + #[command(name = "lucidd", version = BUILD_VERSION, about = "Lucid fleet management platform server")] 11 + struct Cli { 12 + #[command(subcommand)] 13 + command: Option<Command>, 14 + 15 + #[arg(short, long, value_name = "FILE", env = "LUCIDD_CONFIG_FILE")] 16 + config: Option<PathBuf>, 17 + } 18 + 19 + #[derive(Subcommand)] 20 + enum Command { 21 + /// Generate a sample configuration file with all options and their default 22 + /// values, and print it to stdout. 23 + ConfigTemplate, 24 + } 25 + 26 + #[tokio::main] 27 + async fn main() -> ExitCode { 28 + let cli = Cli::parse(); 29 + 30 + if let Some(command) = cli.command { 31 + return match command { 32 + Command::ConfigTemplate => { 33 + print!("{}", lucid_core::config::template()); 34 + ExitCode::SUCCESS 35 + } 36 + } 37 + } 38 + 39 + tracing_subscriber::fmt::init(); 40 + 41 + let config = match lucid_core::config::load(cli.config.as_ref()) { 42 + Ok(config) => config, 43 + Err(e) => { 44 + error!("Failed to load configuration: {e:#}"); 45 + return ExitCode::FAILURE; 46 + } 47 + }; 48 + 49 + lucid_core::config::init(config); 50 + 51 + match run().await { 52 + Ok(()) => ExitCode::SUCCESS, 53 + Err(e) => { 54 + error!("Fatal error: {}", e); 55 + ExitCode::FAILURE 56 + } 57 + } 58 + } 59 + 60 + async fn run() -> Result<(), Box<dyn std::error::Error>> { 61 + let shutdown = CancellationToken::new(); 62 + let shutdown_for_panic = shutdown.clone(); 63 + let default_panic_hook = std::panic::take_hook(); 64 + std::panic::set_hook(Box::new(move |info| { 65 + error!("PANIC: {}", info); 66 + shutdown_for_panic.cancel(); 67 + default_panic_hook(info); 68 + })); 69 + 70 + spawn_signal_handler(shutdown.clone()); 71 + 72 + let state = AppState::new(shutdown.clone()).await?; 73 + 74 + let app = lucid_api::app(state); 75 + 76 + let cfg = lucid_core::config::get(); 77 + 78 + let host = &cfg.server.host; 79 + let port = cfg.server.port; 80 + 81 + let addr: SocketAddr = format!("{}:{}", host, port) 82 + .parse() 83 + .map_err(|e| format!("Invalid host or port: {}", e))?; 84 + 85 + info!("lucidd {} listening on {}", BUILD_VERSION, addr); 86 + 87 + let listener = tokio::net::TcpListener::bind(addr) 88 + .await 89 + .map_err(|e| format!("Failed to bind to {}: {}", addr, e))?; 90 + 91 + let server_handle = tokio::spawn(async move { 92 + axum::serve(listener, app) 93 + .with_graceful_shutdown(shutdown.clone().cancelled_owned()) 94 + .await 95 + }); 96 + 97 + let server_result = server_handle 98 + .await 99 + .map_err(|e| format!("Server task panicked: {}", e))?; 100 + 101 + if let Err(e) = server_result { 102 + error!("Server error: {}", e); 103 + } 104 + 105 + Ok(()) 106 + } 107 + 108 + 109 + fn spawn_signal_handler(shutdown: CancellationToken) { 110 + tokio::spawn(async move { 111 + let ctrl_c = async { 112 + match tokio::signal::ctrl_c().await { 113 + Ok(()) => {} 114 + Err(e) => { 115 + error!("Failed to install Ctrl+C handler: {}", e); 116 + std::future::pending::<()>().await; 117 + } 118 + } 119 + }; 120 + 121 + #[cfg(unix)] 122 + let terminate = async { 123 + match tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate()) { 124 + Ok(mut signal) => { 125 + signal.recv().await; 126 + } 127 + Err(e) => { 128 + error!("Failed to install SIGTERM handler: {}", e); 129 + std::future::pending::<()>().await; 130 + } 131 + } 132 + }; 133 + 134 + #[cfg(not(unix))] 135 + let terminate = std::future::pending::<()>(); 136 + 137 + tokio::select! { 138 + _ = ctrl_c => {}, 139 + _ = terminate => {}, 140 + } 141 + 142 + info!("Shutdown signal received, stopping services..."); 143 + shutdown.cancel(); 144 + }); 145 + }