Is it possible to create a standalone binary? #3048
-
The build/bundler seems to want to build packages that need to be installed. However I would much prefer a portable app that can be packaged as a single binary and run from the directory without needing to be installed. I'm on Windows 11 FWIW but the question is really more general since it should be possible on any OS. Is there a way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
So I discovered I can just run the .exe from src-tauri/target/release and that works, at least in my case. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm not sure if I should open a new discussion/issue, but I would like to be able to create a standalone binary, in my case on Linux, because building AppImage and deb wouldn't make sense on the Arch User Repository/AUR or even just for oneself if they want to use just the binary. |
Beta Was this translation helpful? Give feedback.
-
Anyway,Making Portable programs is a very important requirement |
Beta Was this translation helpful? Give feedback.
-
I've made some progress in this direction with https://github.com/JohnScience/tauriless/. However, I'm not quite sure how to detect presence of Would it be possible/sensible to use |
Beta Was this translation helpful? Give feedback.
-
I tried to run my binary on a Windows 11 machine (that ships with Webview2) and has vcredist installed, the behavior is as others describe. What else are the MSI and NSIS installers putting it in place that allow Tauri apps to run? |
Beta Was this translation helpful? Give feedback.
-
Hi! Young developer here. I've been researching what we can do to get standalone Tauri executables, and I wanted to share my thoughts here. The executable generated in If the app does need As far as I know, it's not possible to statically link the VC++ runtime, or at least I couldn't get it to work by adding the following to [target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"] And shipping the entire WebView2 runtime alongside the So, the only way to distribute a truly portable or standalone Tauri app on Windows is by:
That means we can offer users two distribution options:
We should keep in mind that we may want to notify users that WebView2 and the VC++ redistributable must be installed when choosing the standalone If anyone finds a way to statically link the CRT or bundle WebView2 into a single |
Beta Was this translation helpful? Give feedback.
So I discovered I can just run the .exe from src-tauri/target/release and that works, at least in my case.