Distributing Rust program through installer

what is the easiest way or the best way to create an installer for a rust program or project?

1 Like

I don't think it can be called "easy" as I look at how it's done in the Tauri project: Introduction | Tauri Apps

cargo-dist is approaching easy, at least. But if you need to bundle other resources/files with your executable, it's never truly easy (except if you tie yourself to a specific framework that handles it for you).

I need something that really works. I've tried installer-lite but all I got was tons of errors.
I don't blieve how much less are articles or resources related to this topic: creating an installer for our project.

I was able to stuff all assets into the binary and so I'm just distributing an executable file. Maybe that's an option for you?

https://opensource.axo.dev/cargo-dist/book/way-too-quickstart.html

TLDR: cargo-dist is a souped up version of cargo build which handles building tarballs and installers.

There's not much resources on distribution because a) it's hard and b) most Rust tools are either distributed as part of a preexisting project with its own homegrown packaging workflow, or standalone (mostly) portable executables where you just ship the .exe that cargo build gives you.

Most "simple" packaging tooling on Windows is based on "here's a folder on my disk; make it be on their disk."

2 Likes

thank you for your answer. I know what your saying. I don't care much if the method isn't simple. All I need is a method that works. so I give the installer to customer and customer be able to use it without any farther need to install rust or it's dependencies.
I 'll checking the tool u mentioned here.

thank you buddy.I didn't solve it only by cargo-dist but it helped me alot. in cargo-dist documentations i found the solution.by using cargo vendor i gather all dependencies in a local directory. then use wix tool or inno setup to write and compile an installation script and then I will have the installer.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.