diff --git a/template/src-tauri/.gitignore b/template/src-tauri/.gitignore new file mode 100644 index 0000000..f4dfb82 --- /dev/null +++ b/template/src-tauri/.gitignore @@ -0,0 +1,4 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ + diff --git a/template/src-tauri/build.rs b/template/src-tauri/build.rs index 2ba80a8..d860e1e 100644 --- a/template/src-tauri/build.rs +++ b/template/src-tauri/build.rs @@ -1,3 +1,3 @@ -fn main() { - tauri_build::build() -} +fn main() { + tauri_build::build() +} diff --git a/template/src-tauri/src/main.rs b/template/src-tauri/src/main.rs index 6c67ed8..523550d 100644 --- a/template/src-tauri/src/main.rs +++ b/template/src-tauri/src/main.rs @@ -1,15 +1,15 @@ -// Prevents additional console window on Windows in release, DO NOT REMOVE!! -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - -// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command -#[tauri::command] -fn greet(name: &str) -> String { - format!("Hello, {}! You've been greeted from Rust!", name) -} - -fn main() { - tauri::Builder::default() - .invoke_handler(tauri::generate_handler![greet]) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} +// Prevents additional console window on Windows in release, DO NOT REMOVE!! +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command +#[tauri::command] +fn greet(name: &str) -> String { + format!("Hello, {}! You've been greeted from Rust!", name) +} + +fn main() { + tauri::Builder::default() + .invoke_handler(tauri::generate_handler![greet]) + .run(tauri::generate_context!()) + .expect("error while running tauri application"); +} diff --git a/template/src-tauri/tauri.conf.json b/template/src-tauri/tauri.conf.json index 3f66e34..9f8bd1b 100644 --- a/template/src-tauri/tauri.conf.json +++ b/template/src-tauri/tauri.conf.json @@ -1,46 +1,46 @@ -{ - "build": { - "beforeDevCommand": "", - "beforeBuildCommand": "", - "devPath": "../src", - "distDir": "../src", - "withGlobalTauri": true - }, - "package": { - "productName": "{{ .Data.appName }}", - "version": "{{ .Data.version }}" - }, - "tauri": { - "allowlist": { - "all": false, - "shell": { - "all": false, - "open": true - } - }, - "bundle": { - "active": true, - "targets": "all", - "identifier": "com.{{ .Data.shortName }}-tauri.dev", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ] - }, - "security": { - "csp": null - }, - "windows": [ - { - "fullscreen": false, - "resizable": true, - "title": "{{ .Data.appName }}", - "width": 800, - "height": 600 - } - ] - } -} +{ + "build": { + "beforeDevCommand": "", + "beforeBuildCommand": "", + "devPath": "../src", + "distDir": "../src", + "withGlobalTauri": true + }, + "package": { + "productName": "{{ .Data.appName }}", + "version": "{{ .Data.version }}" + }, + "tauri": { + "allowlist": { + "all": false, + "shell": { + "all": false, + "open": true + } + }, + "bundle": { + "active": true, + "targets": "all", + "identifier": "com.{{ .Data.shortName }}-tauri.dev", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ] + }, + "security": { + "csp": null + }, + "windows": [ + { + "fullscreen": false, + "resizable": true, + "title": "{{ .Data.appName }}", + "width": 800, + "height": 600 + } + ] + } +}