diff --git a/src-tauri/.vscode/launch.json b/src-tauri/.vscode/launch.json new file mode 100644 index 0000000..3dca591 --- /dev/null +++ b/src-tauri/.vscode/launch.json @@ -0,0 +1,64 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'openvcs_lib'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=openvcs" + ], + "filter": { + "name": "openvcs_lib", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'openvcs'", + "cargo": { + "args": [ + "build", + "--bin=openvcs", + "--package=openvcs" + ], + "filter": { + "name": "openvcs", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'openvcs'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=openvcs", + "--package=openvcs" + ], + "filter": { + "name": "openvcs", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3fd483a..c6c35e1 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -8,6 +8,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[profile.release] +opt-level = "z" # optimize for size +lto = true # link-time optimizations +codegen-units = 1 # single codegen unit for better inlining +panic = "abort" # no unwind tables +debug = false # drop debug info +strip = "symbols" # remove symbol table (cargo ≥1.62) + [lib] # The `_lib` suffix may seem redundant but it is necessary # to make the lib name unique and wouldn't conflict with the bin name. @@ -16,7 +24,7 @@ name = "openvcs_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] -tauri-build = { version = "2", features = [] } +tauri-build = { version = "2", default-features = false, features = [] } [dependencies] tauri = { version = "2", features = [] } diff --git a/src-tauri/scripts/run.sh b/src-tauri/scripts/run.sh new file mode 100755 index 0000000..6b70c52 --- /dev/null +++ b/src-tauri/scripts/run.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Disable WebKit’s DMA-BUF path to avoid GBM/Wayland errors +export WEBKIT_DISABLE_DMABUF_RENDERER=1 + +# (Optional) force Wayland or X11 if you ever need it: +# export GDK_BACKEND=wayland +# export GDK_BACKEND=x11 + +# Launch your app +exec cargo run "$@" + diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 4a7b19c..7beea46 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -21,7 +21,12 @@ }, "bundle": { "active": true, - "targets": "all", + "targets": [ + "rpm", + "app", + "deb", + "msi" + ], "icon": [ "icons/32x32.png", "icons/128x128.png",