A focused Docker Compose management web application.
0
fork

Configure Feed

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

chore: split into subprojects and add workspace

Brooke 30dac8a6 3a5e32f2

+174 -199
+1
.gitignore
··· 1 + /target 1 2 .env
+1 -5
.vscode/settings.json
··· 1 - { 2 - "rust-analyzer.linkedProjects": [ 3 - "${workspaceFolder}/packages/node/Cargo.toml" 4 - ] 5 - } 1 + {}
+8
Cargo.toml
··· 1 + [workspace] 2 + resolver = "3" 3 + members = ["packages/core", "packages/macros", "packages/node"] 4 + 5 + [workspace.dependencies] 6 + serde = "1.0.228" 7 + tokio = "1.49.0" 8 + eyre = "0.6.12"
+15
packages/core/Cargo.toml
··· 1 + [package] 2 + name = "luminary-core" 3 + edition = "2024" 4 + 5 + [dependencies] 6 + tokio = { workspace = true, features = ["process", "fs"] } 7 + specta = { version = "1.0.5", features = ["functions"] } 8 + bollard = { version = "0.20.1", features = ["chrono"] } 9 + luminary-macros = { path = "../macros" } 10 + docker-compose-types = "0.22.0" 11 + serde = { workspace = true } 12 + eyre = { workspace = true } 13 + serde-saphyr = "0.0.19" 14 + serde_json = "1.0.149" 15 + envy = "0.4.2"
+7
packages/core/src/configuration.rs
··· 1 + use serde::Deserialize; 2 + 3 + /// A struct containing Luminary configuration, to be loaded from environment variables. 4 + #[derive(Deserialize, Debug)] 5 + pub struct LuminaryConfiguration { 6 + pub project_directory: String, 7 + }
+8
packages/core/src/lib.rs
··· 1 + //! The core library for Luminary, containing all logic related to managing projects and interacting with the Docker engine. 2 + 3 + mod configuration; 4 + pub mod engine; 5 + pub mod model; 6 + mod project; 7 + 8 + pub use engine::LuminaryEngine;
-1
packages/macros/.gitignore
··· 1 - /target
-47
packages/macros/Cargo.lock
··· 1 - # This file is automatically @generated by Cargo. 2 - # It is not intended for manual editing. 3 - version = 4 4 - 5 - [[package]] 6 - name = "luminary-macros" 7 - version = "0.0.0" 8 - dependencies = [ 9 - "proc-macro2", 10 - "quote", 11 - "syn", 12 - ] 13 - 14 - [[package]] 15 - name = "proc-macro2" 16 - version = "1.0.106" 17 - source = "registry+https://github.com/rust-lang/crates.io-index" 18 - checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" 19 - dependencies = [ 20 - "unicode-ident", 21 - ] 22 - 23 - [[package]] 24 - name = "quote" 25 - version = "1.0.44" 26 - source = "registry+https://github.com/rust-lang/crates.io-index" 27 - checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" 28 - dependencies = [ 29 - "proc-macro2", 30 - ] 31 - 32 - [[package]] 33 - name = "syn" 34 - version = "2.0.116" 35 - source = "registry+https://github.com/rust-lang/crates.io-index" 36 - checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb" 37 - dependencies = [ 38 - "proc-macro2", 39 - "quote", 40 - "unicode-ident", 41 - ] 42 - 43 - [[package]] 44 - name = "unicode-ident" 45 - version = "1.0.24" 46 - source = "registry+https://github.com/rust-lang/crates.io-index" 47 - checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+3 -1
packages/macros/src/lib.rs
··· 1 + //! A crate containing procedural macros for Luminary. These are used to reduce boilerplate and improve ergonomics within its codebase. 2 + 1 3 use proc_macro::TokenStream; 2 4 use proc_macro2::TokenStream as TokenStream2; 3 5 use quote::quote; ··· 25 27 return quote! { 26 28 #(#attrs)* 27 29 #visibility #signature { 28 - color_eyre::eyre::WrapErr::wrap_err((#asyncness move || #output #block)()#wait, #attr) 30 + eyre::WrapErr::wrap_err((#asyncness move || #output #block)()#wait, #attr) 29 31 } 30 32 } 31 33 .into();
-1
packages/node/.gitignore
··· 1 - /target
+66 -64
packages/node/Cargo.lock Cargo.lock
··· 56 56 57 57 [[package]] 58 58 name = "annotate-snippets" 59 - version = "0.12.11" 59 + version = "0.12.12" 60 60 source = "registry+https://github.com/rust-lang/crates.io-index" 61 - checksum = "16e4850548ff4a25a77ce3bda7241874e17fb702ea551f0cc62a2dbe052f1272" 61 + checksum = "c86cd1c51b95d71dde52bca69ed225008f6ff4c8cc825b08042aa1ef823e1980" 62 62 dependencies = [ 63 63 "anstyle", 64 + "memchr", 64 65 "unicode-width", 65 66 ] 66 67 ··· 208 209 209 210 [[package]] 210 211 name = "bumpalo" 211 - version = "3.19.1" 212 + version = "3.20.1" 212 213 source = "registry+https://github.com/rust-lang/crates.io-index" 213 - checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" 214 + checksum = "5c6f81257d10a0f602a294ae4182251151ff97dbb504ef9afcdda4a64b24d9b4" 214 215 215 216 [[package]] 216 217 name = "bytes" ··· 220 221 221 222 [[package]] 222 223 name = "cc" 223 - version = "1.2.55" 224 + version = "1.2.56" 224 225 source = "registry+https://github.com/rust-lang/crates.io-index" 225 - checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" 226 + checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" 226 227 dependencies = [ 227 228 "find-msvc-tools", 228 229 "shlex", ··· 300 301 "proc-macro2", 301 302 "quote", 302 303 "strsim", 303 - "syn 2.0.114", 304 + "syn 2.0.116", 304 305 ] 305 306 306 307 [[package]] ··· 311 312 dependencies = [ 312 313 "darling_core", 313 314 "quote", 314 - "syn 2.0.114", 315 + "syn 2.0.116", 315 316 ] 316 317 317 318 [[package]] ··· 332 333 "darling", 333 334 "proc-macro2", 334 335 "quote", 335 - "syn 2.0.114", 336 + "syn 2.0.116", 336 337 ] 337 338 338 339 [[package]] ··· 342 343 checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" 343 344 dependencies = [ 344 345 "derive_builder_core", 345 - "syn 2.0.114", 346 + "syn 2.0.116", 346 347 ] 347 348 348 349 [[package]] ··· 353 354 dependencies = [ 354 355 "proc-macro2", 355 356 "quote", 356 - "syn 2.0.114", 357 + "syn 2.0.116", 357 358 ] 358 359 359 360 [[package]] ··· 465 466 466 467 [[package]] 467 468 name = "futures-channel" 468 - version = "0.3.31" 469 + version = "0.3.32" 469 470 source = "registry+https://github.com/rust-lang/crates.io-index" 470 - checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 471 + checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" 471 472 dependencies = [ 472 473 "futures-core", 473 474 ] 474 475 475 476 [[package]] 476 477 name = "futures-core" 477 - version = "0.3.31" 478 + version = "0.3.32" 478 479 source = "registry+https://github.com/rust-lang/crates.io-index" 479 - checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 480 + checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" 480 481 481 482 [[package]] 482 483 name = "futures-macro" 483 - version = "0.3.31" 484 + version = "0.3.32" 484 485 source = "registry+https://github.com/rust-lang/crates.io-index" 485 - checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 486 + checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" 486 487 dependencies = [ 487 488 "proc-macro2", 488 489 "quote", 489 - "syn 2.0.114", 490 + "syn 2.0.116", 490 491 ] 491 492 492 493 [[package]] 493 494 name = "futures-sink" 494 - version = "0.3.31" 495 + version = "0.3.32" 495 496 source = "registry+https://github.com/rust-lang/crates.io-index" 496 - checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 497 + checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" 497 498 498 499 [[package]] 499 500 name = "futures-task" 500 - version = "0.3.31" 501 + version = "0.3.32" 501 502 source = "registry+https://github.com/rust-lang/crates.io-index" 502 - checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 503 + checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" 503 504 504 505 [[package]] 505 506 name = "futures-util" 506 - version = "0.3.31" 507 + version = "0.3.32" 507 508 source = "registry+https://github.com/rust-lang/crates.io-index" 508 - checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 509 + checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" 509 510 dependencies = [ 510 511 "futures-core", 511 512 "futures-macro", 512 513 "futures-task", 513 514 "pin-project-lite", 514 - "pin-utils", 515 515 "slab", 516 516 ] 517 517 ··· 830 830 ] 831 831 832 832 [[package]] 833 - name = "itertools" 834 - version = "0.14.0" 835 - source = "registry+https://github.com/rust-lang/crates.io-index" 836 - checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 837 - dependencies = [ 838 - "either", 839 - ] 840 - 841 - [[package]] 842 833 name = "itoa" 843 834 version = "1.0.17" 844 835 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 862 853 863 854 [[package]] 864 855 name = "libc" 865 - version = "0.2.180" 856 + version = "0.2.182" 866 857 source = "registry+https://github.com/rust-lang/crates.io-index" 867 - checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" 858 + checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" 868 859 869 860 [[package]] 870 861 name = "litemap" ··· 885 876 checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 886 877 887 878 [[package]] 879 + name = "luminary-core" 880 + version = "0.0.0" 881 + dependencies = [ 882 + "bollard", 883 + "docker-compose-types", 884 + "envy", 885 + "eyre", 886 + "luminary-macros", 887 + "serde", 888 + "serde-saphyr", 889 + "serde_json", 890 + "specta", 891 + "tokio", 892 + ] 893 + 894 + [[package]] 888 895 name = "luminary-macros" 889 896 version = "0.0.0" 890 897 dependencies = [ 891 898 "proc-macro2", 892 899 "quote", 893 - "syn 2.0.114", 900 + "syn 2.0.116", 894 901 ] 895 902 896 903 [[package]] ··· 898 905 version = "0.0.0" 899 906 dependencies = [ 900 907 "axum", 901 - "bollard", 902 908 "color-eyre", 903 - "docker-compose-types", 904 909 "dotenv", 905 - "envy", 906 - "itertools 0.14.0", 910 + "eyre", 911 + "luminary-core", 907 912 "luminary-macros", 908 913 "serde", 909 - "serde-saphyr", 910 - "serde_json", 911 - "specta", 912 914 "tokio", 913 915 ] 914 916 ··· 1149 1151 dependencies = [ 1150 1152 "proc-macro2", 1151 1153 "quote", 1152 - "syn 2.0.114", 1154 + "syn 2.0.116", 1153 1155 ] 1154 1156 1155 1157 [[package]] ··· 1185 1187 dependencies = [ 1186 1188 "proc-macro2", 1187 1189 "quote", 1188 - "syn 2.0.114", 1190 + "syn 2.0.116", 1189 1191 ] 1190 1192 1191 1193 [[package]] ··· 1283 1285 checksum = "4605306321c356e03873b8ee71d7592a5e7c508add325c3ed0677c16fdf1bcfb" 1284 1286 dependencies = [ 1285 1287 "Inflector", 1286 - "itertools 0.10.5", 1288 + "itertools", 1287 1289 "proc-macro2", 1288 1290 "quote", 1289 1291 "syn 1.0.109", ··· 1315 1317 1316 1318 [[package]] 1317 1319 name = "syn" 1318 - version = "2.0.114" 1320 + version = "2.0.116" 1319 1321 source = "registry+https://github.com/rust-lang/crates.io-index" 1320 - checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" 1322 + checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb" 1321 1323 dependencies = [ 1322 1324 "proc-macro2", 1323 1325 "quote", ··· 1338 1340 dependencies = [ 1339 1341 "proc-macro2", 1340 1342 "quote", 1341 - "syn 2.0.114", 1343 + "syn 2.0.116", 1342 1344 ] 1343 1345 1344 1346 [[package]] ··· 1376 1378 dependencies = [ 1377 1379 "proc-macro2", 1378 1380 "quote", 1379 - "syn 2.0.114", 1381 + "syn 2.0.116", 1380 1382 ] 1381 1383 1382 1384 [[package]] ··· 1387 1389 dependencies = [ 1388 1390 "proc-macro2", 1389 1391 "quote", 1390 - "syn 2.0.114", 1392 + "syn 2.0.116", 1391 1393 ] 1392 1394 1393 1395 [[package]] ··· 1433 1435 dependencies = [ 1434 1436 "proc-macro2", 1435 1437 "quote", 1436 - "syn 2.0.114", 1438 + "syn 2.0.116", 1437 1439 ] 1438 1440 1439 1441 [[package]] ··· 1527 1529 1528 1530 [[package]] 1529 1531 name = "unicode-ident" 1530 - version = "1.0.23" 1532 + version = "1.0.24" 1531 1533 source = "registry+https://github.com/rust-lang/crates.io-index" 1532 - checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" 1534 + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" 1533 1535 1534 1536 [[package]] 1535 1537 name = "unicode-width" ··· 1629 1631 "bumpalo", 1630 1632 "proc-macro2", 1631 1633 "quote", 1632 - "syn 2.0.114", 1634 + "syn 2.0.116", 1633 1635 "wasm-bindgen-shared", 1634 1636 ] 1635 1637 ··· 1694 1696 dependencies = [ 1695 1697 "proc-macro2", 1696 1698 "quote", 1697 - "syn 2.0.114", 1699 + "syn 2.0.116", 1698 1700 ] 1699 1701 1700 1702 [[package]] ··· 1705 1707 dependencies = [ 1706 1708 "proc-macro2", 1707 1709 "quote", 1708 - "syn 2.0.114", 1710 + "syn 2.0.116", 1709 1711 ] 1710 1712 1711 1713 [[package]] ··· 1846 1848 dependencies = [ 1847 1849 "proc-macro2", 1848 1850 "quote", 1849 - "syn 2.0.114", 1851 + "syn 2.0.116", 1850 1852 "synstructure", 1851 1853 ] 1852 1854 ··· 1867 1869 dependencies = [ 1868 1870 "proc-macro2", 1869 1871 "quote", 1870 - "syn 2.0.114", 1872 + "syn 2.0.116", 1871 1873 ] 1872 1874 1873 1875 [[package]] ··· 1887 1889 dependencies = [ 1888 1890 "proc-macro2", 1889 1891 "quote", 1890 - "syn 2.0.114", 1892 + "syn 2.0.116", 1891 1893 "synstructure", 1892 1894 ] 1893 1895 ··· 1921 1923 dependencies = [ 1922 1924 "proc-macro2", 1923 1925 "quote", 1924 - "syn 2.0.114", 1926 + "syn 2.0.116", 1925 1927 ] 1926 1928 1927 1929 [[package]] 1928 1930 name = "zmij" 1929 - version = "1.0.20" 1931 + version = "1.0.21" 1930 1932 source = "registry+https://github.com/rust-lang/crates.io-index" 1931 - checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" 1933 + checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+4 -14
packages/node/Cargo.toml
··· 3 3 edition = "2024" 4 4 5 5 [dependencies] 6 - specta = { version = "1.0.5", features = ["functions"] } 7 - bollard = { version = "0.20.1", features = ["chrono"] } 6 + tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } 8 7 luminary-macros = { path = "../macros" } 9 - docker-compose-types = "0.22.0" 10 - serde-saphyr = "0.0.19" 11 - serde_json = "1.0.149" 8 + luminary-core = { path = "../core" } 9 + serde = { workspace = true } 10 + eyre = { workspace = true } 12 11 color-eyre = "0.6.5" 13 - itertools = "0.14.0" 14 - serde = "1.0.228" 15 12 dotenv = "0.15.0" 16 13 axum = "0.8.8" 17 - envy = "0.4.2" 18 - tokio = { version = "1.49.0", features = [ 19 - "rt-multi-thread", 20 - "macros", 21 - "process", 22 - "fs", 23 - ] }
packages/node/rustfmt.toml rustfmt.toml
+6 -6
packages/node/src/api/mod.rs
··· 1 - use axum::routing::get; 2 - use axum::Router; 3 - 4 - pub fn router() -> Router { 5 - Router::new().route("/ping", get(|| async { "pong" })) 6 - } 1 + use axum::Router; 2 + use axum::routing::get; 3 + 4 + pub fn router() -> Router { 5 + Router::new().route("/ping", get(|| async { "pong" })) 6 + }
+46 -52
packages/node/src/core/mod.rs packages/core/src/engine.rs
··· 1 - use std::process::Stdio; 2 - 3 - use bollard::Docker; 4 - use color_eyre::eyre::{Context, Result}; 5 - use luminary_macros::wrap_err; 6 - use serde::Deserialize; 7 - use tokio::process::Command; 8 - 9 - mod model; 10 - mod project; 11 - 12 - /// A struct containing Luminary configuration, to be loaded from environment variables. 13 - #[derive(Deserialize, Debug)] 14 - pub struct LuminaryConfiguration { 15 - pub project_directory: String, 16 - } 17 - 18 - /// The core struct of the Luminary application, containing shared state and configuration. 19 - #[derive(Debug)] 20 - pub struct LuminaryCore { 21 - pub configuration: LuminaryConfiguration, 22 - docker: Docker, 23 - } 24 - 25 - impl LuminaryCore { 26 - /// Initializes a new instance of the LuminaryCore struct, loading configuration from environment variables and connecting to the Docker engine. 27 - pub fn new() -> Result<Self> { 28 - let docker = Docker::connect_with_defaults().wrap_err("Failed to connect to docker engine.")?; 29 - let configuration = envy::prefixed("LUMINARY_").from_env::<LuminaryConfiguration>()?; 30 - 31 - return Ok(Self { 32 - configuration, 33 - docker, 34 - }); 35 - } 36 - 37 - #[wrap_err("Failed to read from docker compose command line interface")] 38 - async fn read_cli(&self, args: Vec<&str>) -> Result<String> { 39 - let output = Command::new("docker") 40 - .arg("compose") 41 - .args(args) 42 - .stdout(Stdio::piped()) 43 - .stderr(Stdio::null()) 44 - .spawn() 45 - .wrap_err("Failed to spawn child process")? 46 - .wait_with_output() 47 - .await 48 - .wrap_err("Failed to wait on child process")?; 49 - let string = String::from_utf8(output.stdout).wrap_err("Invalid UTF-8 from child process")?; 50 - return Ok(string); 51 - } 52 - } 1 + //! The core engine of the Luminary application, containing shared state and configuration. 2 + 3 + use std::process::Stdio; 4 + 5 + use bollard::Docker; 6 + use eyre::{Context, Result}; 7 + use luminary_macros::wrap_err; 8 + use tokio::process::Command; 9 + 10 + use crate::configuration::LuminaryConfiguration; 11 + 12 + /// The core engine of the Luminary application, containing shared state and configuration. 13 + #[derive(Debug)] 14 + pub struct LuminaryEngine { 15 + pub configuration: LuminaryConfiguration, 16 + pub(crate) docker: Docker, 17 + } 18 + 19 + impl LuminaryEngine { 20 + /// Initializes a new instance of the Engine struct, loading configuration from environment variables and connecting to the Docker engine. 21 + pub fn default() -> Result<Self> { 22 + let docker = Docker::connect_with_defaults().wrap_err("Failed to connect to docker engine.")?; 23 + let configuration = envy::prefixed("LUMINARY_").from_env::<LuminaryConfiguration>()?; 24 + 25 + return Ok(Self { 26 + configuration, 27 + docker, 28 + }); 29 + } 30 + 31 + #[wrap_err("Failed to read from docker compose command line interface")] 32 + pub(crate) async fn read_cli(&self, args: Vec<&str>) -> Result<String> { 33 + let output = Command::new("docker") 34 + .arg("compose") 35 + .args(args) 36 + .stdout(Stdio::piped()) 37 + .stderr(Stdio::null()) 38 + .spawn() 39 + .wrap_err("Failed to spawn child process")? 40 + .wait_with_output() 41 + .await 42 + .wrap_err("Failed to wait on child process")?; 43 + let string = String::from_utf8(output.stdout).wrap_err("Invalid UTF-8 from child process")?; 44 + return Ok(string); 45 + } 46 + }
packages/node/src/core/model.rs packages/core/src/model.rs
+4 -4
packages/node/src/core/project.rs packages/core/src/project.rs
··· 3 3 use std::{collections::HashMap, path::Path}; 4 4 5 5 use bollard::{query_parameters::ListContainersOptionsBuilder, secret::ContainerSummaryStateEnum}; 6 - use color_eyre::eyre::{Ok, Result, WrapErr}; 7 6 use docker_compose_types::Compose; 7 + use eyre::{Ok, Result, WrapErr}; 8 8 use luminary_macros::wrap_err; 9 9 use tokio::fs::{self, File}; 10 10 11 - use crate::core::{ 12 - LuminaryCore, 11 + use crate::{ 12 + LuminaryEngine, 13 13 model::{LuminaryProject, LuminaryService, LuminaryStatus}, 14 14 }; 15 15 ··· 19 19 20 20 const COMPOSE_FILENAME: &str = "compose.yml"; 21 21 22 - impl LuminaryCore { 22 + impl LuminaryEngine { 23 23 /// Lists all Luminary projects by combining data from both the filesystem and Docker engine. 24 24 #[wrap_err("Failed to list projects")] 25 25 pub async fn list_projects(&self) -> Result<HashMap<String, LuminaryProject>> {
+5 -4
packages/node/src/main.rs
··· 1 + //! The main entry point for the Luminary Node, which serves as the backend for the Luminary Panel. 2 + 1 3 use axum::Router; 2 - use color_eyre::eyre::Result; 3 4 use dotenv::dotenv; 5 + use eyre::Result; 4 6 use tokio::net::TcpListener; 5 7 6 8 mod api; 7 - mod core; 8 9 9 10 #[tokio::main] 10 11 async fn main() -> Result<()> { 11 12 dotenv().ok(); 12 13 13 - let core = core::LuminaryCore::new()?; 14 - let projects = core.list_projects().await?; 14 + let engine = luminary_core::LuminaryEngine::default()?; 15 + let projects = engine.list_projects().await?; 15 16 println!("Projects: {:#?}", projects); 16 17 17 18 // let listener = TcpListener::bind("0.0.0.0:9000").await?;