mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
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:
@@ -26,26 +26,7 @@ cargo install -f wasm-bindgen-cli@0.2.100
|
||||
|
||||
Regarding the last one: you'll likely get faster build times if you manually install that specific version of `wasm-bindgen-cli`. It is supposed to be installed automatically but a version mismatch causes it to reinstall every single recompilation. It may need to be manually updated periodically to match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](https://github.com/GraphiteEditor/Graphite/blob/master/Cargo.toml).
|
||||
|
||||
<details>
|
||||
<summary>Linux users: click here</summary>
|
||||
|
||||
On Linux, you likely need to install this set of additional packages which are required by Tauri, even if you're just building the web app:
|
||||
|
||||
```sh
|
||||
# On Debian-based (Ubuntu, Mint, etc.) distributions:
|
||||
sudo apt install libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
|
||||
|
||||
# On Fedora-based (RHEL, CentOS, etc.) distributions:
|
||||
sudo dnf install gtk3-devel libsoup-devel javascriptcoregtk4.0-devel webkit2gtk4.0-devel
|
||||
|
||||
# On OpenSUSE-based distributions:
|
||||
sudo zypper install gtk3-devel libsoup-devel webkit2gtk3-soup2-devel
|
||||
|
||||
# On NixOS or when using the Nix package manager:
|
||||
nix-shell
|
||||
```
|
||||
|
||||
</details>
|
||||
Lastly, if you intend to develop using the Tauri desktop app build target, obtain [Tauri's dependencies](https://v2.tauri.app/start/prerequisites/). This is not the usual setup for most contributors, so you will know if you need it.
|
||||
|
||||
## Repository
|
||||
|
||||
@@ -66,7 +47,17 @@ npm start
|
||||
|
||||
This spins up the dev server at <http://localhost:8080> with a file watcher that performs hot reloading of the web page. You should be able to start the server, edit and save web and Rust code, and shut it down by double pressing <kbd>Ctrl</kbd><kbd>C</kbd>. You sometimes may need to reload the browser's page if hot reloading didn't behave right— always refresh when Rust recompiles.
|
||||
|
||||
This method compiles Graphite code in debug mode which includes debug symbols for viewing function names in stack traces. But be aware, it runs slower and the Wasm binary is much larger. Having your browser's developer tools open will also significantly impact performance in both debug and release builds, so it's best to close that when not in use.
|
||||
This method compiles Graphite code in debug mode which includes debug symbols for viewing function names in stack traces. But be aware, it runs slower and the Wasm binary is much larger. (Having your browser's developer tools open will also significantly impact performance in both debug and release builds, so it's best to close that when not in use.)
|
||||
|
||||
To run the dev server in optimized mode, which is faster and produces a smaller Wasm binary:
|
||||
|
||||
```sh
|
||||
# Includes debug symbols
|
||||
npm run profiling
|
||||
|
||||
# Excludes (most) debug symbols, used in release builds
|
||||
npm run production
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Production build instructions: click here</summary>
|
||||
|
||||
Reference in New Issue
Block a user