Anti Bloat

The following links have tutorials on reducing the size of your installers:

Rust Compression Features

Add this to your src-tauri/Cargo.toml

[profile.release]
panic = "abort"
codegen-units = 1
lto = true
incremental = false
opt-level = "z"

UPX

UPX, Ultimate Packer for eXecutables, is a dinosaur amongst the binary packers. This 23-year old, well-maintained piece of kit is GPL-v2 licensed with a pretty liberal usage declaration. Our understanding of the licensing is that you can use it for any purposes (commercial or otherwise) without needing to change your license unless you modify the source code of UPX.

Basically it compresses the binary and decompresses it at runtime. It should work for pretty much any binary type out there. Read more: https://github.com/upx/upx

Usage on macOS

$ brew install upx
$ yarn tauri build
$ upx --ultra-brute src-tauri/target/release/bundle/osx/app.app/Contents/macOS/app
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2018
UPX 3.95        Markus Oberhumer, Laszlo Molnar & John Reiser   Aug 26th 2018

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    963140 ->    274448   28.50%   macho/amd64   app