tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.7k stars 2.37k forks source link

[feat] Allow uncompressed resources embedded to the executable binary. #8894

Open lencil opened 4 months ago

lencil commented 4 months ago

Describe the problem

When use large size file, in production tauri app will compress it into its binary target. Using it will lead some time cost to uncompressed the data.

Describe the solution you'd like

Add an option in config, let user decide to enable/disable resource compression in production.

Alternatives considered

No response

Additional context

No response

FabianLars commented 4 months ago

If you mean assets that are part of your distDir/frontendDist you can disable compression like this: https://tauri.app/v1/guides/building/app-size/#disable-tauris-asset-compression

If you mean resources embedded in the bundle/installer then it depends. i think .app and .deb aren't compressed, .appimages are always heavily compressed without an off-switch (at least as far as i know, maybe there's a linuxdeploy env var), nsis based setup.exe can be configured via https://tauri.app/v1/api/config#nsisconfig.compression.