Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 27 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .nix
2 changes: 1 addition & 1 deletion .github/workflows/build-dev-and-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:

- name: 🧪 Run Rust tests
run: |
mold -run cargo test --all-features
mold -run cargo test --all-features --workspace

# miri:
# runs-on: self-hosted
Expand Down
99 changes: 99 additions & 0 deletions .nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 114 additions & 0 deletions .nix/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# This is a helper file for people using NixOS as their operating system.
# If you don't know what this file does, you can safely ignore it.
# This file defines both the development environment for the project.
#
# Development Environment:
# - Provides all necessary tools for Rust/WASM development
# - Includes Tauri dependencies for desktop app development
# - Sets up profiling and debugging tools
# - Configures mold as the default linker for faster builds
#
#
# Usage:
# - Development shell: `nix develop`
# - Run in dev shell with direnv: add `use flake` to .envrc
{
description = "Development environment and build configuration";

inputs = {
# This url should be changed to match your system packages if you work on tauri because you need to use the same graphics library versions as the ones used by your system
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { nixpkgs, nixpkgs-unstable, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system overlays;
};

rustc-wasm = pkgs.rust-bin.stable.latest.default.override {
targets = [ "wasm32-unknown-unknown" ];
extensions = [ "rust-src" "rust-analyzer" "clippy" "cargo" ];
};

# Shared build inputs - system libraries that need to be in LD_LIBRARY_PATH
buildInputs = with pkgs; [
# System libraries
openssl
vulkan-loader
mesa
libraw


# Tauri dependencies: keep in sync with https://v2.tauri.app/start/prerequisites/
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
buildTools = [
rustc-wasm
pkgs.nodejs
pkgs.nodePackages.npm
pkgs.binaryen
pkgs.wasm-bindgen-cli
pkgs-unstable.wasm-pack
pkgs.pkg-config
pkgs.git
pkgs.gobject-introspection
pkgs-unstable.cargo-tauri

# Linker
pkgs.mold
];
# Development tools that don't need to be in LD_LIBRARY_PATH
devTools = with pkgs; [
cargo-watch
cargo-nextest
cargo-expand

# Profiling tools
gnuplot
samply
cargo-flamegraph

];
in
{
# Development shell configuration
devShells.default = pkgs.mkShell {
packages = buildInputs ++ buildTools ++ devTools;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
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";


shellHook = ''
alias cargo='mold --run cargo'
'';
};
}
);
}
Loading