You've already forked pages
forked from didirus/AstralRinth
* Modpack support * Finish feature * Tauri errors fix (#61) * async impl * working * fmt and redundancy * moved ? to if let Ok block * Finish modpacks support * remove generated file * fix compile err * fix lint * Fix code review comments + forge support --------- Co-authored-by: Wyatt Verchere <wverchere@gmail.com>
17 lines
564 B
JavaScript
17 lines
564 B
JavaScript
/**
|
|
* All theseus API calls return serialized values (both return values and errors);
|
|
* So, for example, addDefaultInstance creates a blank Profile object, where the Rust struct is serialized,
|
|
* and deserialized into a usable JS object.
|
|
*/
|
|
import { invoke } from '@tauri-apps/api/tauri'
|
|
|
|
// Installs pack from a version ID
|
|
export async function install(version_id) {
|
|
return await invoke('pack_install_version_id', version_id)
|
|
}
|
|
|
|
// Installs pack from a path
|
|
export async function install_from_file(path) {
|
|
return await invoke('pack_install_file', path)
|
|
}
|