How to distribute a tauri app as an Flatpak

So, i have a app called Cherit, and i want to distribute it as a flatpak. i can’t find a startight forward way of doing it. can you please help?

First of all, you may know this already, but for general information about how an Flatpak app is build, you can see the Flatpak documentation, like the Building your first Flatpak introduction and the section about Building.

You should also have read the Flathub requirements beforehand. It makes the job of the reviewer, and your submission process, much easier if you follow the requirements from the get-go.

Also, see the documentation for Submission on how the submission process happens.


Now, with the general stuff out of the way, for your app specifically you need to be able to make an offline build and installation inside the Flatpak sandbox, as a Flatpak build on Flathub is build with the full sandbox enforcement, so no network. And nowadays it should be from source whenever possible.

The main question would be about dependencies, which you will need to add to your manifest as well. If they are “classic” dependencies, like an dynamic library that you link to, you build the library according to its building instructions in an addition module before your app into the /app prefix and it should be then available.

For Tauri, I think you can build it from with Cargo, but you need to create manifest sources for each crate, as Flatpak Builder needs to download them before build for Cargo, since Cargo will not have a internet connection.
Luckily, you can use the Flatpak Cargo Generator to generate them for you.

Looking at your repository, your webapp seems to use Bun (?), which is totally new for me. The tricky part will likely be to build that inside the Flatpak sandbox, should you need to use that runtime. Look in the documentation if there are some instructions on how to build the runtime from source.
As for the node dependencies for the webapp itself, you should (hopefully) be able to use the Flatpak Node Generator.


A few general hints on the end:
You can locally start your manifest with the Flatpak Builder having internet access, to first get an direction for it. But, in the end, it will be necessary for Flatpak Builder to pull the sources before the app is build offline.

Also, you can look at how existing Tauri apps have been build on Flatpak. All apps on Flathub have a link on their app page linking to their build manifest, for example here is the one for RapidRAW.

Finally, you can always ask questions in this forum or in the Flatpak or Flathub Matrix rooms.

first of all, thanks for such a comprehensive and effort full guidance. i really appriciate that.

so, i will try to implement all the things that you mentioned for me. its a little overwhelming and the ecosystem is new to me. so i am trying to do my best and don’t again make the mistake of use ai.