Crate thermite

source ·
Expand description

Basic Usage:

use thermite::{Ctx, update_index, LocalIndex, ProjectDirs, install};
use std::path::Path;

async fn example() {
    let index = update_index::<&Path>(None, None).await;
    let mut target = LocalIndex::load_or_create(Path::new("mods"));
    let mut ctx = Ctx::new(ProjectDirs::from("com", "YourOrg", "YourApp").unwrap());
    if let Some(md) = index.iter().find(|e| e.name == "server_utilities") {
        let latest = md.versions.get(&md.latest).unwrap();
        install(&mut ctx, &mut target, &[&latest], false, true).await.unwrap();
    }    
}

Re-exports

pub use crate::core::utils::update_index;
pub use crate::core::Ctx;
pub use crate::model::LocalIndex;
pub use crate::model::LocalMod;
pub use crate::model::Mod;
pub use crate::model::ModVersion;

Modules

Macros

Structs

ProjectDirs computes the location of cache, config or data directories for a specific application, which are derived from the standard directories and the name of the project/organization.

Functions

Finds mods in the LocalIndex whose version doesn’t match the provided remote index
Download and install mod(s) to the specified target. Will check the cache before downloading if configured.
Install N* to the provided path
Download and install updated versions of provided mods. Updates the LocalIndex and clears old versions from the cache as well.