uranium-rs 1.0.4

Lib for downloading/making minecraft and modpacks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;
use std::sync::RwLock;
use std::sync::LazyLock;

pub static TEMP_DIR: LazyLock<PathBuf> = LazyLock::new(|| {
    dirs::state_dir()
        .map(|d| d.join("uranium"))
        .unwrap()
});

/// In case NTHREADS cant be read this value will be returned
pub const DEFAULT_NTHREADS: usize = 8;
pub const RINTH_JSON: &str = "modrinth.index.json";
pub const CURSE_JSON: &str = "manifest.json";
pub const OVERRIDES_FOLDER: &str = "overrides/";
pub const PROFILES_FILE: &str = "launcher_profiles.json";

pub static NTHREADS: RwLock<usize> = RwLock::new(8);