# AppImage

{% hint style="info" %} <mark style="color:purple;">**Sources**</mark>

* Upstream prebuilt if it exists & is actively maintained
* Community created prebuilts if official prebuilt doesn't exist & we can't build from source
  {% endhint %}

### Schema

{% hint style="info" %}
[<mark style="color:purple;">**`.pkg`**</mark>](https://docs.pkgforge.dev/sbuild/specification/2.pkg): <mark style="color:orange;">**`${PKG_NAME}`**</mark>

[<mark style="color:purple;">**`.pkg_type`**</mark>](https://docs.pkgforge.dev/sbuild/specification/2.pkg): <mark style="color:green;">**`appimage`**</mark>

<mark style="color:blue;">**`${SBUILD_PKG}`**</mark> : <mark style="color:green;">**`${PKG_NAME}.appimage`**</mark>
{% endhint %}

***

### **Prerequisites (`HOST)`**

{% hint style="info" %}

* [**Fuse**](https://docs.pkgforge.dev/formats/packages/broken-reference): Required for mounting Filesystems & Images (Can still be run with [<mark style="color:orange;">`--appimage-extract-and-run`</mark> | <mark style="color:orange;">`APPIMAGE_EXTRACT_AND_RUN=1`</mark>](https://docs.appimage.org/user-guide/troubleshooting/fuse.html#fallback-if-fuse-can-t-be-made-working))
* [**Fonts**](https://docs.pkgforge.dev/formats/packages/broken-reference): Required to display/render Non-English Chars, Emojis, Symbols etc.
* [<mark style="color:blue;">**Kernel User NameSpaces**</mark>](https://docs.pkgforge.dev/formats/packages/broken-reference): Required for Sandboxing, Security & Performance
  {% endhint %}

***

### Sandbox

{% hint style="danger" %}

* AppImages have no built-in sandboxing
* There exists third party tools like [<mark style="color:blue;">**aisap**</mark>](https://github.com/mgord9518/aisap) , but we <mark style="color:red;">**DO NOT RECOMMEND**</mark> it as it is not actively maintained
  {% endhint %}

***

### Quirks

{% hint style="info" %} <mark style="color:red;">**WARNINGS**</mark>

* NEVER run **`strip`**, **`objcopy`** or any other binary rewriting tool as they will often just strip the **`squashfs|dwarfs`** archive, only preserving the **`runtime`**.
* A typical <mark style="color:green;">**`.appimage`**</mark> file is not a real elf binary, thus will not survive this process.
* On [<mark style="color:purple;">**NixOS**</mark>](https://nixos.org/), you will need to follow: <https://wiki.nixos.org/wiki/Appimage>
  {% endhint %}
