From 72ddd7b7704f2087a52c9c0552446682918c513b Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Thu, 22 Jan 2026 23:14:08 +0100 Subject: Implement basic game files download logic Implement core clap arguments Respect XDG_BASE_DIR Currently library extraction is broken because it assumes every instace has it's own library folder. This should be refactored so instances share libraries Signed-off-by: Filip Wandzio --- src/constants.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/constants.rs (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs new file mode 100644 index 0000000..52833b2 --- /dev/null +++ b/src/constants.rs @@ -0,0 +1,13 @@ +#![allow(dead_code)] + +use std::time::Duration; + +pub const VERSION_MANIFEST_URL: &str = + "https://launchermeta.mojang.com/mc/game/version_manifest.json"; + +pub const DOWNLOAD_RETRIES: usize = 3; +pub const DOWNLOAD_BACKOFF: Duration = Duration::from_millis(400); + +pub const DEFAULT_MAX_MEMORY_MB: u32 = 2048; +pub const DEFAULT_JAVA_PATH: &str = "java"; +pub const DEFAULT_VERSION: &str = "latest"; -- cgit v1.2.3