AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

How would i go about making an appimage of a rust program?

Open ergpopler opened this issue 5 years ago • 6 comments

as the title states, I would like to make an appimage of a Rust program but i cannot seem to find any useful information whatsoever.

Also what is an AppDir?

ergpopler avatar Oct 30 '20 13:10 ergpopler

https://github.com/pop-os/popsicle/ is a Rust program which is shipped as an AppImage. It works like with any other AppImage, as Rust produces native binaries. See https://docs.appimage.org/packaging-guide/from-source/native-binaries.html.

The only difference is that Rust doesn't support make install DESTDIR=... really well, so you cannot easily create an AppDir that way. You can, however, specify your binaries manually to bundling tools like linuxdeploy (there, it's the -e parameter).

Popsicle in particular utilizies appimagecraft, which makes building even easier. See https://github.com/pop-os/popsicle/blob/master/appimagecraft.yml.

TheAssassin avatar Oct 30 '20 16:10 TheAssassin

Regarding AppDirs, this is the page you were looking for: https://docs.appimage.org/reference/appdir.html

TheAssassin avatar Oct 30 '20 16:10 TheAssassin

uhhh so i should use appimagecraft?

ergpopler avatar Oct 30 '20 21:10 ergpopler

You should first and foremost read the docs on bundling native binaries, which applies to Rust binaries as well.

You can use appimagecraft if you don't want to maintain your own scripts. It allows you to minimize the amount of custom scripting you need to write. But it's entirely optional.

TheAssassin avatar Oct 30 '20 21:10 TheAssassin

Whats the opinion about using musl to create static binaries?

srevinsaju avatar Nov 27 '20 18:11 srevinsaju

Cargo AppImage:

  • https://github.com/StratusFearMe21/cargo-appimage

This a cargo program that allows you to convert your Rust programs into AppImages.

ghost avatar Dec 22 '22 04:12 ghost