From bdd225aadee485bab45f0988763b804af2cd0da8 Mon Sep 17 00:00:00 2001 From: llerandi Date: Mon, 27 Jul 2026 21:43:55 +0200 Subject: [PATCH 1/5] fix: correct Linux packages and project structure for Tauri v1 --- .github/workflows/ci.yaml | 2 +- README.md | 26 ++++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 999fde8..a73ad46 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - libwebkit2gtk-4.1-dev \ + libwebkit2gtk-4.0-dev \ build-essential \ libssl-dev \ libayatana-appindicator3-dev \ diff --git a/README.md b/README.md index 0946c85..bcc8ca9 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Install the system packages that Tauri needs. The exact command depends on your ``` sudo apt update -sudo apt install libwebkit2gtk-4.1-dev \ +sudo apt install libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ @@ -106,7 +106,7 @@ sudo apt install libwebkit2gtk-4.1-dev \ **Fedora:** ``` -sudo dnf install webkit2gtk4.1-devel \ +sudo dnf install webkit2gtk3-devel \ openssl-devel \ curl \ wget \ @@ -119,7 +119,7 @@ sudo dnf group install "C Development Tools and Libraries" **Arch Linux:** ``` -sudo pacman -Syu webkit2gtk-4.1 \ +sudo pacman -Syu webkit2gtk \ base-devel \ curl \ wget \ @@ -143,7 +143,7 @@ cd json-tree-editor ## Running in development -Start the app in development mode. The window opens immediately and reloads when you save changes to `src/index.html`. +Start the app in development mode. The window opens immediately and reloads when you save changes to `src/index.html` or `src/main.js`. ``` cargo tauri dev @@ -175,19 +175,17 @@ The output is placed in `src-tauri/target/release/bundle/`. json-tree-editor/ ├── docs/ │ └── img/ -│ └── app.png # Screenshot used in this README +│ └── app.png # Screenshot used in this README ├── src/ -│ └── index.html # The entire frontend: HTML, CSS, and JavaScript +│ ├── index.html # HTML structure and styles +│ └── main.js # All application logic ├── src-tauri/ -│ ├── capabilities/ -│ │ └── default.json # Declares which Tauri APIs the frontend can call -│ ├── icons/ # App icons for all platforms +│ ├── icons/ # App icons for all platforms │ ├── src/ -│ │ ├── main.rs # Entry point: starts the Tauri event loop -│ │ └── lib.rs # Registers plugins (file dialog, file system) -│ ├── build.rs # Build-time code generation required by Tauri -│ ├── Cargo.toml # Rust dependencies -│ └── tauri.conf.json # App name, window size, bundle settings +│ │ └── main.rs # Entry point: starts the Tauri event loop +│ ├── build.rs # Build-time code generation required by Tauri +│ ├── Cargo.toml # Rust dependencies +│ └── tauri.conf.json # App name, window size, permissions, bundle settings ├── .gitignore └── README.md ``` From 7d27cbb3e9a04a84d0bfc6df39a77c7452d2fa3f Mon Sep 17 00:00:00 2001 From: llerandi Date: Mon, 27 Jul 2026 21:45:47 +0200 Subject: [PATCH 2/5] fix: pin CI to ubuntu-22.04 and document Linux version requirement --- .github/workflows/ci.yaml | 2 +- README.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a73ad46..809f785 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: jobs: check: name: Check, lint, format, test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code diff --git a/README.md b/README.md index bcc8ca9..bf1c9ec 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,9 @@ A dialog will appear asking you to confirm. Click **Install** and wait for it to Install the system packages that Tauri needs. The exact command depends on your distribution. -**Ubuntu / Debian:** +**Ubuntu 22.04 / Debian 11 or earlier:** + +Note: `libwebkit2gtk-4.0-dev` is not available on Ubuntu 24.04 or later. Use Ubuntu 22.04 (Jammy) or Debian 11 (Bullseye) to build this project on Linux. ``` sudo apt update From cf315580222abec50608533c2d3f2e4c333cfd66 Mon Sep 17 00:00:00 2001 From: llerandi Date: Mon, 27 Jul 2026 21:51:45 +0200 Subject: [PATCH 3/5] fix: use webkit2gtk-4-1 feature flag and ubuntu-latest for CI --- .github/workflows/ci.yaml | 4 ++-- README.md | 6 ++---- src-tauri/Cargo.toml | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 809f785..999fde8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: jobs: check: name: Check, lint, format, test - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout code @@ -19,7 +19,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - libwebkit2gtk-4.0-dev \ + libwebkit2gtk-4.1-dev \ build-essential \ libssl-dev \ libayatana-appindicator3-dev \ diff --git a/README.md b/README.md index bf1c9ec..0bc388a 100644 --- a/README.md +++ b/README.md @@ -89,13 +89,11 @@ A dialog will appear asking you to confirm. Click **Install** and wait for it to Install the system packages that Tauri needs. The exact command depends on your distribution. -**Ubuntu 22.04 / Debian 11 or earlier:** - -Note: `libwebkit2gtk-4.0-dev` is not available on Ubuntu 24.04 or later. Use Ubuntu 22.04 (Jammy) or Debian 11 (Bullseye) to build this project on Linux. +**Ubuntu / Debian:** ``` sudo apt update -sudo apt install libwebkit2gtk-4.0-dev \ +sudo apt install libwebkit2gtk-4.1-dev \ build-essential \ curl \ wget \ diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4d23094..1c30132 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -12,6 +12,7 @@ tauri = { version = "1", features = [ "dialog-open", "fs-write-file", "fs-read-file", + "webkit2gtk-4-1", ] } serde = { version = "1", features = ["derive"] } serde_json = "1" From badc9c73e28172eead8df560ed03a77dfce53abe Mon Sep 17 00:00:00 2001 From: llerandi Date: Mon, 27 Jul 2026 21:54:30 +0200 Subject: [PATCH 4/5] fix: pin CI to ubuntu-22.04 with fresh cache key for Tauri v1 compatibility --- .github/workflows/ci.yaml | 8 ++++---- README.md | 4 ++-- src-tauri/Cargo.toml | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 999fde8..f2102cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: jobs: check: name: Check, lint, format, test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code @@ -19,7 +19,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - libwebkit2gtk-4.1-dev \ + libwebkit2gtk-4.0-dev \ build-essential \ libssl-dev \ libayatana-appindicator3-dev \ @@ -37,9 +37,9 @@ jobs: ~/.cargo/registry ~/.cargo/git src-tauri/target - key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }} + key: ubuntu22-cargo-${{ hashFiles('src-tauri/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo- + ubuntu22-cargo- - name: Check formatting working-directory: src-tauri diff --git a/README.md b/README.md index 0bc388a..7b05eaf 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,11 @@ A dialog will appear asking you to confirm. Click **Install** and wait for it to Install the system packages that Tauri needs. The exact command depends on your distribution. -**Ubuntu / Debian:** +**Ubuntu 22.04 / Debian:** ``` sudo apt update -sudo apt install libwebkit2gtk-4.1-dev \ +sudo apt install libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 1c30132..4d23094 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -12,7 +12,6 @@ tauri = { version = "1", features = [ "dialog-open", "fs-write-file", "fs-read-file", - "webkit2gtk-4-1", ] } serde = { version = "1", features = ["derive"] } serde_json = "1" From e73e5ed526d1d728ba750e21f812518d1de4aae3 Mon Sep 17 00:00:00 2001 From: llerandi Date: Mon, 27 Jul 2026 21:57:15 +0200 Subject: [PATCH 5/5] fix: move withGlobalTauri to build section for Tauri v1 --- src-tauri/tauri.conf.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e8807b6..9679fb3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,14 +1,14 @@ { "$schema": "../node_modules/@tauri-apps/cli/schema.json", "build": { - "distDir": "../src" + "distDir": "../src", + "withGlobalTauri": true }, "package": { "productName": "JSON Tree Editor", "version": "0.1.0" }, "tauri": { - "withGlobalTauri": true, "allowlist": { "all": false, "dialog": {