This commit is contained in:
Moritz Jörg
2025-08-18 22:23:07 +02:00
parent 2ff9dafc13
commit 06632b4413
28 changed files with 4846 additions and 4 deletions

View File

@@ -53,6 +53,8 @@
"@spectrum-web-components/tooltip": "^1.6.0",
"@spectrum-web-components/top-nav": "^1.7.0",
"@spectrum-web-components/underlay": "^1.6.0",
"@tauri-apps/api": "^2.7.0",
"@tauri-apps/plugin-shell": "^2",
"@turf/bezier-spline": "^7.2.0",
"@vaadin/login": "^24.8.0",
"lit": "^3.3.0",
@@ -73,6 +75,7 @@
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^13.2.6",
"@sentry/vite-plugin": "^3.5.0",
"@tauri-apps/cli": "^2.7.1",
"@vitejs/plugin-react": "^5.0.0",
"rollup-plugin-scss": "^4.0.1",
"semantic-release": "^24.2.5",
@@ -733,6 +736,34 @@
"@szmarczak/http-timer": ["@szmarczak/http-timer@5.0.1", "", { "dependencies": { "defer-to-connect": "^2.0.1" } }, "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw=="],
"@tauri-apps/api": ["@tauri-apps/api@2.8.0", "", {}, "sha512-ga7zdhbS2GXOMTIZRT0mYjKJtR9fivsXzsyq5U3vjDL0s6DTMwYRm0UHNjzTY5dh4+LSC68Sm/7WEiimbQNYlw=="],
"@tauri-apps/cli": ["@tauri-apps/cli@2.8.0", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.8.0", "@tauri-apps/cli-darwin-x64": "2.8.0", "@tauri-apps/cli-linux-arm-gnueabihf": "2.8.0", "@tauri-apps/cli-linux-arm64-gnu": "2.8.0", "@tauri-apps/cli-linux-arm64-musl": "2.8.0", "@tauri-apps/cli-linux-riscv64-gnu": "2.8.0", "@tauri-apps/cli-linux-x64-gnu": "2.8.0", "@tauri-apps/cli-linux-x64-musl": "2.8.0", "@tauri-apps/cli-win32-arm64-msvc": "2.8.0", "@tauri-apps/cli-win32-ia32-msvc": "2.8.0", "@tauri-apps/cli-win32-x64-msvc": "2.8.0" }, "bin": { "tauri": "tauri.js" } }, "sha512-2k1xCIDVaqtQ4b0mNUbr22JyPR2EnA/o3FsHf6sT53+5FIK+yzDC17gGopUJ3ikCvvverZ/83phmno0t4KFwUw=="],
"@tauri-apps/cli-darwin-arm64": ["@tauri-apps/cli-darwin-arm64@2.8.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-+Ab2XNCTcJztTGM+1ym4uIDGOH7r6tYxwjDqa9/KxkrHdRYeoMxVBa5zQHsnJ/KXfynqagK86t61ys8Ei/tv0Q=="],
"@tauri-apps/cli-darwin-x64": ["@tauri-apps/cli-darwin-x64@2.8.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-DrBK3tf+CWmYC3ma+mhYn7LbXiPARLx27SjYCaErRK6/4hgmOgD0xrDhcRhYT2w7uY1iPhsfkx+ZOWQexH9qOw=="],
"@tauri-apps/cli-linux-arm-gnueabihf": ["@tauri-apps/cli-linux-arm-gnueabihf@2.8.0", "", { "os": "linux", "cpu": "arm" }, "sha512-ZlvSgEcYNQBn07dY+4QOChobnJwVtElMSI7NH+oA6x7pQu2n5JVW7Mu3nntIA05IDEArVVURGA/walDuoR0wIQ=="],
"@tauri-apps/cli-linux-arm64-gnu": ["@tauri-apps/cli-linux-arm64-gnu@2.8.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-wSQgTDFVJjXDMPrh/Muzl5p1JKAsSUhlT12HYDEc5aEmNHxWH0ng4Gp0QADhwlzUZkiJMqvMva2HzJijQnjELA=="],
"@tauri-apps/cli-linux-arm64-musl": ["@tauri-apps/cli-linux-arm64-musl@2.8.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-/bC/v5SzT2pmfWh8NhIaFx0ON4UcdI3LpDjuXeU4y+rXFXRAKKdKnKBshReHr6KC9UxzS8wGSsSe2eTfJnyXWw=="],
"@tauri-apps/cli-linux-riscv64-gnu": ["@tauri-apps/cli-linux-riscv64-gnu@2.8.0", "", { "os": "linux", "cpu": "none" }, "sha512-hzzsrGp3SXXLuJZdjcq1mAmzr9MaBEQy1DYGEn/HEBiwE8EY1Ou27sBistGkl+X/vusmGwgmLuRKe9Mtbb7mNQ=="],
"@tauri-apps/cli-linux-x64-gnu": ["@tauri-apps/cli-linux-x64-gnu@2.8.0", "", { "os": "linux", "cpu": "x64" }, "sha512-5z0uKFYGcy8pW8dDooRExmCtunz9BEVETlbNTaarTeXueGk1t3jH43k3uQ0/gIeYvL0X/8oWf848CzJdTSpoLQ=="],
"@tauri-apps/cli-linux-x64-musl": ["@tauri-apps/cli-linux-x64-musl@2.8.0", "", { "os": "linux", "cpu": "x64" }, "sha512-7uHwJUhE5e9NqSPrjAuN69X+I32uxN0V3UGwUB6eLhV7MhCyjroqVdfFqOkIT2rUE/OtSGQiUO7z0ZGfY3OIdQ=="],
"@tauri-apps/cli-win32-arm64-msvc": ["@tauri-apps/cli-win32-arm64-msvc@2.8.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Emzj0BswRbKp3daDZWS7jbiSzJ0pUcaXFIQYC8sHc34vQe4RwbHZc99XKf+J6XRAznXs0piDvW9HQbXs3uVvXA=="],
"@tauri-apps/cli-win32-ia32-msvc": ["@tauri-apps/cli-win32-ia32-msvc@2.8.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-xHWSyiZCzyc5+7djVaB1soOTe++c/siTZ0EC05Or7QYQRQsKRxDpeTCgheN7Z/Sv1cdlvkK1OZgp4+ddB4hTCA=="],
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.8.0", "", { "os": "win32", "cpu": "x64" }, "sha512-EpkyVj2idqQthfxkjYcLRTaFM+TluywD4RbdVfjnLE060vPM6LYPouDizYZqXRfEsd5LCi1/VAcsqTK9BAC/zA=="],
"@tauri-apps/plugin-shell": ["@tauri-apps/plugin-shell@2.3.0", "", { "dependencies": { "@tauri-apps/api": "^2.6.0" } }, "sha512-6GIRxO2z64uxPX4CCTuhQzefvCC0ew7HjdBhMALiGw74vFBDY95VWueAHOHgNOMV4UOUAFupyidN9YulTe5xlA=="],
"@turf/area": ["@turf/area@7.2.0", "", { "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" } }, "sha512-zuTTdQ4eoTI9nSSjerIy4QwgvxqwJVciQJ8tOPuMHbXJ9N/dNjI7bU8tasjhxas/Cx3NE9NxVHtNpYHL0FSzoA=="],
"@turf/bbox": ["@turf/bbox@7.2.0", "", { "dependencies": { "@turf/helpers": "^7.2.0", "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" } }, "sha512-wzHEjCXlYZiDludDbXkpBSmv8Zu6tPGLmJ1sXQ6qDwpLE1Ew3mcWqt8AaxfTP5QwDNQa3sf2vvgTEzNbPQkCiA=="],

View File

@@ -15,6 +15,7 @@
"@sentry/vite-plugin": "^3.5.0",
"@vitejs/plugin-react": "^5.0.0",
"rollup-plugin-scss": "^4.0.1",
"@tauri-apps/cli": "^2.7.1",
"semantic-release": "^24.2.5",
"semantic-release-dotnet": "^1.0.0",
"vite": "npm:rolldown-vite@latest",
@@ -73,6 +74,8 @@
"@spectrum-web-components/underlay": "^1.6.0",
"@turf/bezier-spline": "^7.2.0",
"@vaadin/login": "^24.8.0",
"@tauri-apps/api": "^2.7.0",
"@tauri-apps/plugin-shell": "^2",
"lit": "^3.3.0",
"lit-html": "^3.3.0",
"ol": "^10.6.0",

View File

@@ -6,8 +6,35 @@ let
port = 8000;
shell = pkgs.callPackage ./../../shell.nix { };
in
pkgs.mkShellNoCC {
pkgs.mkShell rec {
inputsFrom = [ shell ];
packages = [
pkgs.rustc
pkgs.cargo
pkgs.cargo-tauri
pkgs.gobject-introspection
pkgs.pkg-config
];
buildInputs = [
pkgs.at-spi2-atk
pkgs.atkmm
pkgs.cairo
pkgs.gdk-pixbuf
pkgs.glib
pkgs.gtk3
pkgs.harfbuzz
pkgs.librsvg
pkgs.libsoup_3
pkgs.pango
pkgs.webkitgtk_4_1
pkgs.openssl
];
RUST_BACKTRACE = "1";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
LOG_LEVEL = "verbose";
REDIS = "localhost:6379";

View File

@@ -0,0 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
# Generated by Tauri
# will have schema files for capabilities auto-completion
/gen/schemas

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,21 @@
[package]
name = "atlantis"
version = "0.1.0"
description = "A Tauri App"
authors = ["Moritz Jörg"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "atlantis_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-shell = "2"
serde_json = "1"
serde = { version = "1", features = ["derive"] }

View File

@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

View File

@@ -0,0 +1,9 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,13 @@
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello {name}, You have been greeted from Rust!")
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

View File

@@ -0,0 +1,6 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
atlantis_lib::run()
}

View File

@@ -0,0 +1,37 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "atlantis",
"version": "0.1.0",
"identifier": "com.oceanbox.atlantis",
"build": {
"beforeDevCommand": "./run",
"devUrl": "http://localhost:8081",
"beforeBuildCommand": "bun run build",
"frontendDist": "../"
},
"app": {
"windows": [
{
"title": "Atlantis",
"width": 800,
"height": 600,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}

View File

@@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
const certDir = `${process.env.HOME}/.vite-plugin-mkcert`;
const host = process.env.TAURI_DEV_HOST;
const proxy = {
target: `http://127.0.0.1:8085/`,
@@ -37,9 +38,26 @@ export default defineConfig({
},
server: {
port: 8081,
host: "0.0.0.0",
https: true,
cors: true,
// host: "0.0.0.0",
strictPort: true,
https: false,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 8081,
}
: undefined,
// https: true,
// cors: true,
watch: {
// 3. tell Vite to ignore watching `src-tauri` and `fsharp`
ignored: [
"**/src-tauri/**",
"**/*.fs"
],
},
proxy: {
'/socket': proxy,
"/api": proxy,