diff options
| author | Filip Wandzio <contact@philw.dev> | 2026-01-22 23:14:08 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2026-01-22 23:14:08 +0100 |
| commit | 72ddd7b7704f2087a52c9c0552446682918c513b (patch) | |
| tree | e5134f215ea82c1fc8eda17b34e426a7b1dfafc6 /src/constants.rs | |
| download | dml-72ddd7b7704f2087a52c9c0552446682918c513b.tar.gz dml-72ddd7b7704f2087a52c9c0552446682918c513b.zip | |
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 <contact@philw.dev>
Diffstat (limited to 'src/constants.rs')
| -rw-r--r-- | src/constants.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ | |||
| 1 | #![allow(dead_code)] | ||
| 2 | |||
| 3 | use std::time::Duration; | ||
| 4 | |||
| 5 | pub const VERSION_MANIFEST_URL: &str = | ||
| 6 | "https://launchermeta.mojang.com/mc/game/version_manifest.json"; | ||
| 7 | |||
| 8 | pub const DOWNLOAD_RETRIES: usize = 3; | ||
| 9 | pub const DOWNLOAD_BACKOFF: Duration = Duration::from_millis(400); | ||
| 10 | |||
| 11 | pub const DEFAULT_MAX_MEMORY_MB: u32 = 2048; | ||
| 12 | pub const DEFAULT_JAVA_PATH: &str = "java"; | ||
| 13 | pub const DEFAULT_VERSION: &str = "latest"; | ||
