tauriflatpakvscodium

Build Tauri from Flatpak Sandbox


I've installed VSCodium on my Fedora desktop as a Flatpak.

I have installed the node.js Flatpak SDK, together with pnpm as package manager.

When I create a Tauri app (version 2.0 - Release Candidate, currently) I get an error yelling at me that the WebKit GTK library is not found: since we're in the flatpak terminal there's no such thing as dnf or apt.

My question is: how do I get the Tauri app to build inside a Flatpak sandbox?


Solution

  • Although you could compile the WebKit GTK SDK from scratch (overall it's doable with more niche libraries - especially if you want to patch them), you're better off just running VSCodium with the org.gnome.Sdk like so:

    flatpak run --runtime=org.gnome.Sdk//45 com.vscodium.codium
    

    Please note that you need to explicitly set the SDK version: in this case number 45 included all the correct libraries, but it might change - keep an eye on the changelog.

    And then from inside you may create the app with:

    pnpm create tauri-app --rc
    

    Or, if you had already created the app and want to develop it:

    pnpm tauri dev