You've already forked AstralRinth
forked from didirus/AstralRinth
Profile bindings (#55)
* basic framework. still has errors * added functionality for main endpoints + some structuring * formatting * unused code * mimicked CLI function with wait_for process * made PR changes, added playground * cargo fmt * removed missed println * misc tests fixes * cargo fmt * added windows support * cargo fmt * all OS use dunce * restructured profile slightly; fixed mac bug * profile changes, new main.rs * fixed requested pr + canonicaliation bug * fixed regressed bug in ui * fixed regressed bugs * fixed git error * typo * ran prettier * clippy * playground clippy * ported profile loading fix * profile change for real, url println and clippy * PR changes --------- Co-authored-by: Wyatt <wyatt@modrinth.com>
This commit is contained in:
@@ -3,8 +3,33 @@
|
||||
windows_subsystem = "windows"
|
||||
)]
|
||||
|
||||
use theseus::prelude::*;
|
||||
|
||||
mod api;
|
||||
|
||||
// Should be called in launcher initialization
|
||||
#[tauri::command]
|
||||
async fn initialize_state() -> api::Result<()> {
|
||||
State::get().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
initialize_state,
|
||||
api::profile_create::profile_create_empty,
|
||||
api::profile_create::profile_create,
|
||||
api::profile::profile_add,
|
||||
api::profile::profile_add_path,
|
||||
api::profile::profile_remove,
|
||||
api::profile::profile_get,
|
||||
api::profile::profile_is_managed,
|
||||
api::profile::profile_is_loaded,
|
||||
api::profile::profile_list,
|
||||
api::profile::profile_run,
|
||||
api::profile::profile_run_wait,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user