Update Tauri to v2 and execute only the node graph in native (#2362)

* Migrate tauri app to v2

* Move flake files to sub directory

* Remove unused plugins

* Backport some of the tauri code

* Implement async node graph execution

Only move node runtime to native code

* Always use gpu feature for tauri

* Fix serialization

* Add logging filters

* Enable native window rendering with vello

* Cleanup

* Remove unused editor instance

* Remove changes from vite config

* Remove warnings

* Remove unused files

* Fix most tests

* Cleanup

* Apply frontend lint

* Readd flake.nix

* Fix tests using --all-features

* Code review

* Enable all backends

* Fix monitor node downcast types

* Change debug log to a warning

* Disable shader passthrough

* Cleanup unused imports

* Remove warning

* Update project setup instructions

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2025-04-14 11:43:15 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 29479f6e3e
commit 9b23c7e2db
39 changed files with 10429 additions and 2831 deletions
-23
View File
@@ -24,14 +24,6 @@ use std::sync::atomic::Ordering;
use std::time::Duration;
use wasm_bindgen::prelude::*;
// /// We directly interface with the updateImage JS function for massively increased performance over serializing and deserializing.
// /// This avoids creating a json with a list millions of numbers long.
// #[wasm_bindgen(module = "/../src/editor.ts")]
// extern "C" {
// // fn dispatchTauri(message: String) -> String;
// fn dispatchTauri(message: String);
// }
/// Set the random seed used by the editor by calling this from JS upon initialization.
/// This is necessary because WASM doesn't have a random number generator.
#[wasm_bindgen(js_name = setRandomSeed)]
@@ -184,21 +176,6 @@ impl EditorHandle {
}
}
// #[wasm_bindgen(js_name = tauriResponse)]
// pub fn tauri_response(&self, _message: JsValue) {
// #[cfg(feature = "tauri")]
// match ron::from_str::<Vec<FrontendMessage>>(&_message.as_string().unwrap()) {
// Ok(response) => {
// for message in response {
// self.send_frontend_message_to_js(message);
// }
// }
// Err(error) => {
// log::error!("tauri response: {error:?}\n{_message:?}");
// }
// }
// }
/// Displays a dialog with an error message
#[wasm_bindgen(js_name = errorDialog)]
pub fn error_dialog(&self, title: String, description: String) {