Remove tauri based desktop app
@@ -49,21 +49,6 @@
|
|||||||
vulkan-loader
|
vulkan-loader
|
||||||
mesa
|
mesa
|
||||||
libraw
|
libraw
|
||||||
|
|
||||||
|
|
||||||
# Tauri dependencies: keep in sync with https://v2.tauri.app/start/prerequisites/#system-dependencies (under the NixOS tab)
|
|
||||||
at-spi2-atk
|
|
||||||
atkmm
|
|
||||||
cairo
|
|
||||||
gdk-pixbuf
|
|
||||||
glib
|
|
||||||
gtk3
|
|
||||||
harfbuzz
|
|
||||||
librsvg
|
|
||||||
libsoup_3
|
|
||||||
pango
|
|
||||||
webkitgtk_4_1
|
|
||||||
openssl
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Development tools that don't need to be in LD_LIBRARY_PATH
|
# Development tools that don't need to be in LD_LIBRARY_PATH
|
||||||
@@ -93,7 +78,6 @@
|
|||||||
gnuplot
|
gnuplot
|
||||||
samply
|
samply
|
||||||
cargo-flamegraph
|
cargo-flamegraph
|
||||||
|
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -105,7 +89,6 @@
|
|||||||
GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/";
|
GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/";
|
||||||
XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
|
XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";
|
||||||
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
alias cargo='mold --run cargo'
|
alias cargo='mold --run cargo'
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ members = [
|
|||||||
"editor",
|
"editor",
|
||||||
"proc-macros",
|
"proc-macros",
|
||||||
"frontend/wasm",
|
"frontend/wasm",
|
||||||
"frontend/src-tauri",
|
|
||||||
"node-graph/gapplication-io",
|
"node-graph/gapplication-io",
|
||||||
"node-graph/gbrush",
|
"node-graph/gbrush",
|
||||||
"node-graph/gcore",
|
"node-graph/gcore",
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ targets = [
|
|||||||
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
|
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
|
||||||
]
|
]
|
||||||
|
|
||||||
# Tauri produces too many nonsense warnings.
|
|
||||||
exclude = ["tauri", "tauri-build"]
|
|
||||||
|
|
||||||
|
|
||||||
# This section is considered when running `cargo deny check advisories`
|
# This section is considered when running `cargo deny check advisories`
|
||||||
# More documentation for the advisories section can be found here:
|
# More documentation for the advisories section can be found here:
|
||||||
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
|
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
"lint-fix": "eslint . --fix && tsc --noEmit",
|
"lint-fix": "eslint . --fix && tsc --noEmit",
|
||||||
"---------- INTERNAL ----------": "",
|
"---------- INTERNAL ----------": "",
|
||||||
"setup": "node package-installer.js",
|
"setup": "node package-installer.js",
|
||||||
"tauri:dev": "vite",
|
|
||||||
"tauri:build": "wasm-pack build ./wasm --target=web --features=tauri",
|
|
||||||
"wasm:build-dev": "wasm-pack build ./wasm --dev --target=web",
|
"wasm:build-dev": "wasm-pack build ./wasm --dev --target=web",
|
||||||
"wasm:build-profiling": "wasm-pack build ./wasm --profiling --target=web",
|
"wasm:build-profiling": "wasm-pack build ./wasm --profiling --target=web",
|
||||||
"wasm:build-production": "wasm-pack build ./wasm --release --target=web",
|
"wasm:build-production": "wasm-pack build ./wasm --release --target=web",
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# Generated by Cargo
|
|
||||||
# will have compiled files and executables
|
|
||||||
/target/
|
|
||||||
# Generated by tauri
|
|
||||||
gen/
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "graphite-desktop"
|
|
||||||
version = "0.1.0"
|
|
||||||
description = "Graphite Desktop"
|
|
||||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
|
||||||
license = "Apache-2.0"
|
|
||||||
repository = ""
|
|
||||||
default-run = "graphite-desktop"
|
|
||||||
edition = "2021"
|
|
||||||
rust-version = "1.79"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
# By default Tauri runs in production mode when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
|
|
||||||
default = ["custom-protocol", "gpu"]
|
|
||||||
# This feature is used for production builds where `devPath` points to the filesystem
|
|
||||||
# DO NOT remove this
|
|
||||||
custom-protocol = ["tauri/custom-protocol"]
|
|
||||||
gpu = ["graphite-editor/gpu"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
# Local dependencies
|
|
||||||
graphite-editor = { path = "../../editor", features = [
|
|
||||||
"gpu",
|
|
||||||
"ron",
|
|
||||||
"vello",
|
|
||||||
"decouple-execution",
|
|
||||||
] }
|
|
||||||
|
|
||||||
# Workspace dependencies
|
|
||||||
axum = { workspace = true }
|
|
||||||
chrono = { workspace = true }
|
|
||||||
tokio = { workspace = true }
|
|
||||||
ron = { workspace = true }
|
|
||||||
log = { workspace = true }
|
|
||||||
fern = { workspace = true }
|
|
||||||
futures = { workspace = true }
|
|
||||||
|
|
||||||
# Required dependencies
|
|
||||||
tauri = { version = "2", features = ["devtools", "wry"] }
|
|
||||||
tauri-plugin-shell = "2"
|
|
||||||
tauri-plugin-http = "2"
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
# Required dependencies
|
|
||||||
tauri-build = { version = "2", features = [] }
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
use std::fs;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
// Directory required for compilation, but not tracked by git if empty.
|
|
||||||
let dist_dir: PathBuf = ["..", "dist"].iter().collect();
|
|
||||||
fs::create_dir_all(dist_dir).unwrap();
|
|
||||||
tauri_build::build()
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"identifier": "desktop-capability",
|
|
||||||
"platforms": ["macOS", "windows", "linux"],
|
|
||||||
"windows": ["main"],
|
|
||||||
"permissions": ["http:default"]
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
"identifier": "migrated",
|
|
||||||
"description": "permissions that were migrated from v1",
|
|
||||||
"local": true,
|
|
||||||
"windows": ["main"],
|
|
||||||
"permissions": [
|
|
||||||
"core:default",
|
|
||||||
"core:window:allow-create",
|
|
||||||
"core:window:allow-center",
|
|
||||||
"core:window:allow-request-user-attention",
|
|
||||||
"core:window:allow-set-resizable",
|
|
||||||
"core:window:allow-set-maximizable",
|
|
||||||
"core:window:allow-set-minimizable",
|
|
||||||
"core:window:allow-set-closable",
|
|
||||||
"core:window:allow-set-title",
|
|
||||||
"core:window:allow-maximize",
|
|
||||||
"core:window:allow-unmaximize",
|
|
||||||
"core:window:allow-minimize",
|
|
||||||
"core:window:allow-unminimize",
|
|
||||||
"core:window:allow-show",
|
|
||||||
"core:window:allow-hide",
|
|
||||||
"core:window:allow-close",
|
|
||||||
"core:window:allow-set-decorations",
|
|
||||||
"core:window:allow-set-always-on-top",
|
|
||||||
"core:window:allow-set-content-protected",
|
|
||||||
"core:window:allow-set-size",
|
|
||||||
"core:window:allow-set-min-size",
|
|
||||||
"core:window:allow-set-max-size",
|
|
||||||
"core:window:allow-set-position",
|
|
||||||
"core:window:allow-set-fullscreen",
|
|
||||||
"core:window:allow-set-focus",
|
|
||||||
"core:window:allow-set-icon",
|
|
||||||
"core:window:allow-set-skip-taskbar",
|
|
||||||
"core:window:allow-set-cursor-grab",
|
|
||||||
"core:window:allow-set-cursor-visible",
|
|
||||||
"core:window:allow-set-cursor-icon",
|
|
||||||
"core:window:allow-set-cursor-position",
|
|
||||||
"core:window:allow-set-ignore-cursor-events",
|
|
||||||
"core:window:allow-start-dragging",
|
|
||||||
"core:webview:allow-print",
|
|
||||||
"shell:allow-execute",
|
|
||||||
"shell:allow-open",
|
|
||||||
"http:default",
|
|
||||||
"core:app:allow-app-show",
|
|
||||||
"core:app:allow-app-hide",
|
|
||||||
"shell:default",
|
|
||||||
"http:default"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,84 +0,0 @@
|
|||||||
#![cfg_attr(all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows")]
|
|
||||||
|
|
||||||
use axum::routing::get;
|
|
||||||
use axum::Router;
|
|
||||||
use fern::colors::{Color, ColoredLevelConfig};
|
|
||||||
use graphite_editor::node_graph_executor::*;
|
|
||||||
use std::sync::Mutex;
|
|
||||||
|
|
||||||
static NODE_RUNTIME_IO: Mutex<Option<NodeRuntimeIO>> = const { Mutex::new(None) };
|
|
||||||
|
|
||||||
#[tokio::main]
|
|
||||||
async fn main() {
|
|
||||||
println!("Starting server...");
|
|
||||||
|
|
||||||
let colors = ColoredLevelConfig::new().debug(Color::Magenta).info(Color::Green).error(Color::Red);
|
|
||||||
|
|
||||||
fern::Dispatch::new()
|
|
||||||
.chain(std::io::stdout())
|
|
||||||
.level(log::LevelFilter::Trace)
|
|
||||||
.level_for("naga", log::LevelFilter::Error)
|
|
||||||
.level_for("wgpu-hal", log::LevelFilter::Error)
|
|
||||||
.level_for("wgpu_hal", log::LevelFilter::Error)
|
|
||||||
.level_for("wgpu_core", log::LevelFilter::Error)
|
|
||||||
.format(move |out, message, record| {
|
|
||||||
out.finish(format_args!(
|
|
||||||
"[{}]{} {} {}",
|
|
||||||
// This will color the log level only, not the whole line. Just a touch.
|
|
||||||
colors.color(record.level()),
|
|
||||||
chrono::Utc::now().format("[%Y-%m-%d %H:%M:%S]"),
|
|
||||||
message,
|
|
||||||
record.module_path().unwrap_or("")
|
|
||||||
))
|
|
||||||
})
|
|
||||||
.apply()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
std::thread::spawn(|| loop {
|
|
||||||
futures::executor::block_on(graphite_editor::node_graph_executor::run_node_graph());
|
|
||||||
std::thread::sleep(std::time::Duration::from_millis(16))
|
|
||||||
});
|
|
||||||
graphite_editor::application::set_uuid_seed(0);
|
|
||||||
|
|
||||||
let mut runtime_lock = NODE_RUNTIME_IO.lock().unwrap();
|
|
||||||
*runtime_lock = Some(NodeRuntimeIO::new());
|
|
||||||
drop(runtime_lock);
|
|
||||||
|
|
||||||
let app = Router::new().route("/", get(|| async { "Hello, World!" }));
|
|
||||||
|
|
||||||
// Run it with hyper on localhost:3000
|
|
||||||
tauri::async_runtime::spawn(async {
|
|
||||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
|
||||||
axum::serve(listener, app).await.unwrap();
|
|
||||||
});
|
|
||||||
|
|
||||||
tauri::Builder::default()
|
|
||||||
.plugin(tauri_plugin_http::init())
|
|
||||||
.plugin(tauri_plugin_shell::init())
|
|
||||||
.invoke_handler(tauri::generate_handler![poll_node_graph, runtime_message])
|
|
||||||
.setup(|_app| {
|
|
||||||
use tauri::Manager;
|
|
||||||
_app.get_webview_window("main").unwrap().open_devtools();
|
|
||||||
Ok(())
|
|
||||||
})
|
|
||||||
.run(tauri::generate_context!())
|
|
||||||
.expect("error while running tauri application");
|
|
||||||
}
|
|
||||||
#[tauri::command]
|
|
||||||
fn poll_node_graph() -> String {
|
|
||||||
let vec: Vec<_> = NODE_RUNTIME_IO.lock().as_mut().unwrap().as_mut().unwrap().receive().collect();
|
|
||||||
ron::to_string(&vec).unwrap()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tauri::command]
|
|
||||||
fn runtime_message(message: String) -> Result<(), String> {
|
|
||||||
let message = match ron::from_str(&message) {
|
|
||||||
Ok(message) => message,
|
|
||||||
Err(e) => {
|
|
||||||
log::error!("Failed to deserialize message: {}\nwith error: {}", message, e);
|
|
||||||
return Err("Failed to deserialize message".into());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let response = NODE_RUNTIME_IO.lock().as_ref().unwrap().as_ref().unwrap().send(message);
|
|
||||||
response
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
|
||||||
"build": {
|
|
||||||
"beforeBuildCommand": "npm run tauri:build",
|
|
||||||
"beforeDevCommand": "npm run tauri:dev",
|
|
||||||
"frontendDist": "../dist",
|
|
||||||
"devUrl": "http://127.0.0.1:8080/"
|
|
||||||
},
|
|
||||||
"bundle": {
|
|
||||||
"active": true,
|
|
||||||
"category": "DeveloperTool",
|
|
||||||
"copyright": "",
|
|
||||||
"targets": "all",
|
|
||||||
"externalBin": [],
|
|
||||||
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
|
||||||
"windows": {
|
|
||||||
"certificateThumbprint": null,
|
|
||||||
"digestAlgorithm": "sha256",
|
|
||||||
"timestampUrl": ""
|
|
||||||
},
|
|
||||||
"longDescription": "",
|
|
||||||
"macOS": {
|
|
||||||
"entitlements": null,
|
|
||||||
"exceptionDomain": "",
|
|
||||||
"frameworks": [],
|
|
||||||
"providerShortName": null,
|
|
||||||
"signingIdentity": null
|
|
||||||
},
|
|
||||||
"resources": [],
|
|
||||||
"shortDescription": "",
|
|
||||||
"linux": {
|
|
||||||
"deb": {
|
|
||||||
"depends": ["librustc_codegen_spirv"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"productName": "Graphite",
|
|
||||||
"mainBinaryName": "Graphite",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"identifier": "rs.graphite.editor",
|
|
||||||
"plugins": {},
|
|
||||||
"app": {
|
|
||||||
"withGlobalTauri": true,
|
|
||||||
"windows": [
|
|
||||||
{
|
|
||||||
"decorations": false,
|
|
||||||
"fullscreen": false,
|
|
||||||
"height": 1080,
|
|
||||||
"resizable": true,
|
|
||||||
"title": "Graphite",
|
|
||||||
"width": 1920,
|
|
||||||
"useHttpsScheme": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"security": {
|
|
||||||
"csp": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||