Files
calorie-tracker/src-tauri/src/main.rs
Vilian Gerdzhikov 12365282a3 Merge release v0.0.2 (#60)
* update v0.0.1

* update v0.0.1

* add rust cache

* rename step

* fix test workflow

* change to build

* add password

* move app.jpeg

* bump & update name

* remove logo

* untrack .vscode

* remove icon from readme

* use npx

* rename file and do dom element check

* formating

* added rust files

* generated bindings

* rename to ipc

* add more examples

* move file

* new img

* refactor

* add clippy and tests

* imrpove clippy

* add semi

* enable release profile

* refactor

* first changeset

* version changeset

* version app

* move version in front of tagname

* do not error on local

* run after build

* use another workflow for clippy
2023-05-19 01:09:42 -02:00

34 lines
827 B
Rust

#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
use commands::register_command_handlers;
use state::register_managed_state;
use tauri::{Builder as TauriBuilder, RunEvent};
mod commands;
mod error;
mod prelude;
mod state;
fn main() {
// App builder
let app = TauriBuilder::default().plugin(tauri_plugin_window_state::Builder::default().build());
// Register app commands
let app = register_command_handlers(app);
// Register app managed state
let app = register_managed_state(app);
// Run the app
app.build(tauri::generate_context!())
.expect("error while running tauri application")
.run(|_, e| {
if matches!(e, RunEvent::Ready) {
println!("Window is ready");
}
});
}