Distribution

ende desktop cross-compiles from any host. The same machine builds for macOS arm64, Windows x86_64, Linux arm64, and Linux x86_64. Backend binaries (CEF, WebView, etc.) are downloaded as needed.

Per-platform output

# Build for the host platform.
ende desktop main.ts

# Build for a specific target.
ende desktop --target aarch64-apple-darwin main.ts

# Build for every supported target in one go.
ende desktop --all-targets main.ts

Supported triples:

Triple OS Architecture
aarch64-apple-darwin macOS arm64
x86_64-pc-windows-msvc Windows x86_64
aarch64-unknown-linux-gnu Linux arm64
x86_64-unknown-linux-gnu Linux x86_64

The CLI fetches the matching prebuilt endert and the matching prebuilt backend archive automatically. No platform-specific toolchain is needed on the host.

Output formats

The output extension determines the format:

macOS

Output Produced by
MyApp.app/ Default; .app bundle.
MyApp.dmg hdiutil; drag-to-Applications disk image.

The .app bundle has the standard layout:

MyApp.app/
  Contents/
    Info.plist
    MacOS/
      laufey_webview         # the backend executable (the bundle's executable)
      libruntime.dylib       # Ende runtime + your code
    Resources/
      AppIcon.icns           # icon (optional)
    Frameworks/
      Chromium Embedded Framework.framework/    # CEF backend
      …

With the cef and raw backends, the executable is that backend's binary and the runtime library is named after it (<executable>.dylib).

The bundle runs as it is, with nothing extracted on first launch. To ship a smaller, self-extracting bundle instead, see Compressing the bundle.

Windows

Output Produced by
MyApp/ Default; directory with MyApp.exe and support files.
MyApp.msi Windows Installer package (per-machine install).

The MyApp/ directory contains:

MyApp/
  MyApp.exe               # the backend executable, renamed to the app name
  MyApp.dll               # Ende runtime + your code
  *.dll, …                # backend support files (CEF libraries with `cef`)
  AppIcon.ico             # icon (optional; also embedded in MyApp.exe)
  register-deep-links.bat # only with desktop.app.deepLinks

MyApp.exe loads the MyApp.dll next to it, so double-clicking it starts the app; there is no separate launcher script. A --compress build is different: its MyApp/ folder holds the compressed payload and a MyApp.bat launcher that extracts and starts the app.

Set a .msi output extension to build a Windows Installer package directly. It installs the app per-machine under %ProgramFiles%\<AppName>\ and registers an uninstaller, with the app's icon in Apps & features. The MSI is authored in pure Rust, so it cross-compiles from any host (only the target must be Windows). To package the directory another way, zip it or feed it into a third-party installer generator such as Inno Setup, NSIS, or WiX.

Bump the version in ende.json for every MSI release. Installing an MSI removes an installed older version of the app, and an MSI refuses to install over a newer one ("A newer version of … is already installed."). Versions are compared by the MSI's ProductVersion: the first three numeric fields of version (1.0.0 without a version, or with one that isn't numeric). A prerelease or build suffix and a fourth field are dropped, so going from 1.2.0-beta.1 to 1.2.0-beta.2 isn't a new version. A rebuild with the same ProductVersion installs as a repair of the installed copy, and its changes aren't reliably applied. The fields can be at most 255, 255 and 65535, so a CalVer-style version such as 2026.8.26 fails the build. Which app an MSI replaces is decided by its upgrade code, derived from app.identifier, or from sh.ende.desktop.<app name lowercased> without one.

Ende 2026.11.10

MSI packages upgrade an installed older version and refuse downgrades, and show the app's icon in Apps & features.

Linux

Output Produced by
my-app/ Default; app directory with my-app binary.
my-app.AppImage Single-file portable bundle.
my-app.deb Debian/Ubuntu package.
my-app.rpm Fedora/RHEL package.

The app directory layout:

my-app/
  my-app                  # the backend executable, renamed to the app name
  my-app.so               # Ende runtime + your code
  *.so, …                 # backend support files (CEF libraries with `cef`)
  AppIcon.png             # icon (optional)
  <identifier>.desktop    # desktop entry

my-app loads the runtime library next to it, so running it starts the app; there is no separate launcher script. (A --compress build replaces my-app with a shell script that extracts and starts the app.) The library is named after the app with everything from its last . removed, so an app named myapp.v1.2.3 gets myapp.v1.2.so.

AppImage is the most portable Linux format: one file, no install step, runs on any modern distro. ende desktop builds it directly: it packs the app directory into a SquashFS image and prepends the AppImage Type-2 runtime, adding the required AppRun, .desktop, and icon entries. There is no external tool to install (no appimagetool), and it works from any build host, so you can produce a Linux .AppImage while cross-compiling from macOS or Windows.

Set a .deb or .rpm output extension to build a Linux package directly. Both install the app under /usr/lib/<pkg>/, symlink a launcher into /usr/bin/, and register a .desktop entry and icon. The .desktop entry also registers the app's deep links (Ende 2026.11.10+). Like the .AppImage, they are assembled in pure Rust and cross-compile from any host (only the target must be Linux).

Compressing the bundle

Pass --compress to ship a self-extracting bundle. The heavy payload (the runtime and UI backend) is compressed inside the distributed app and unpacked to a per-user data directory on first launch, then reused on later runs. This shrinks the distributed artifact substantially, a webview hello-world drops from about 66 MB to 19 MB, in exchange for a one-time decompression on first launch.

# Self-extracting, compressed bundle
ende desktop --compress main.ts

# Choose the codec explicitly
ende desktop --compress=xz main.ts
ende desktop --compress=zstd main.ts

xz produces the smaller artifact; zstd trades some size for faster first-launch decompression, but needs the zstd tool on the user's machine. Compression is off unless you pass --compress.

On macOS, the compressed app is a small launcher app. On first launch it extracts the real app to ~/Library/Application Support/<bundle id>/<hash>/ and opens it with LaunchServices, then exits. The extracted app runs as its own app, with one Dock icon and working tray icons, and opening the launcher again brings it to the front. It doesn't get the launcher's environment, standard streams or exit status. On Windows and Linux, the launcher extracts to a per-user data folder and starts the real app from there.

Ende 2026.11.10

A compressed macOS app opens the extracted app through LaunchServices.

Choosing the output path

The output path can be set in these places, in priority order:

  1. The --output CLI flag.
  2. The desktop.output field in ende.json (per-platform). The entry for the OS of --target is used, or the host's OS without it; --all-targets uses each target's own entry.
  3. desktop.app.name in ende.json.
  4. The default: the entrypoint's file name, or its folder for main.ts, mod.ts, index.ts and cli.ts, with the platform-appropriate extension.
# Override per build:
ende desktop --output ./builds/MyApp-1.4.0.dmg main.ts
ende.json
{
  "desktop": {
    "output": {
      "macos": "./dist/macos/MyApp.app",
      "windows": "./dist/windows/MyApp",
      "linux": "./dist/linux/my-app.AppImage"
    }
  }
}

Cross-compilation details

Cross-compiling from one OS to another requires:

  • The Ende runtime library for the target. Downloaded automatically from https://dl.ende.sh/release/v<version>/, matching your local Ende version, and checked against the SHA-256 sums embedded in Ende releases (Ende 2026.12.01+; see Runtime archive checks).
  • The right backend archive for the target. Downloaded automatically from the laufey project's GitHub releases, at the laufey version your Ende version is built with, and checked against the SHA-256 sums pinned in Ende.

Both downloads are cached under <ende_dir>/.

ende desktop also accepts --engine v8|quickjs, which selects the JavaScript engine inside the downloaded runtime library. V8 is the default; the experimental QuickJS build is smaller but does not receive the same security updates. Ende releases don't publish the QuickJS runtime library yet, so a release build of Ende refuses --engine quickjs, unless ENDERT_DESKTOP_BIN names a runtime library, which is then used as it is and --engine is ignored with a warning. See choosing a JavaScript engine for the full trade-offs.

There is no Rust toolchain involved in cross-compiling a desktop app. You are not compiling Rust on the host; you are downloading prebuilt artifacts for the target and packaging them with your code. This is the same model as ende compile --target.

Icon assembly (.icns, .ico) and the Linux .AppImage are produced on any host. The one exception is the macOS .dmg, which shells out to hdiutil and therefore must be built on a macOS host. To produce a .dmg from another platform, build it on a macOS CI machine.

CI

A typical GitHub Actions matrix builds platform-native installers in parallel:

.github/workflows/release.yml
jobs:
  build:
    strategy:
      matrix:
        include:
          - { os: macos-14, target: aarch64-apple-darwin }
          - { os: windows-latest, target: x86_64-pc-windows-msvc }
          - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - name: Install Ende
        run: |
          curl -fsSL https://ende.sh/install.sh | sh
          echo "$HOME/.ende/bin" >> "$GITHUB_PATH"

      - run: ende desktop --target ${{ matrix.target }} main.ts

      - uses: actions/upload-artifact@v4
        with:
          name: my-app-${{ matrix.target }}
          path: dist/

Cross-compiling from a single host (e.g. only running on ubuntu-latest with --all-targets) works for the bundles and the Linux .AppImage. Only the macOS .dmg needs a macOS host.

Code signing

On macOS, ende desktop code-signs the bundle for you. By default it applies an ad-hoc signature (-), which gives the app a stable code identity, enough for the OS to grant notification permission, but not enough to distribute without Gatekeeper warnings. The CEF helper processes' bundle identifiers are harmonized with the main bundle id automatically.

To produce a distributable, notarizable bundle, set a real signing identity in ende.json (signing must run on a macOS host, since it shells out to codesign(1)):

ende.json
{
  "desktop": {
    "app": { "identifier": "com.example.myapp" },
    "macos": {
      "codesignIdentity": "Developer ID Application: Acme, Inc. (TEAMID)"
    }
  }
}

With a real identity, the bundle is signed with Hardened Runtime and a secure timestamp. Notarization is still a separate step. Submit the signed bundle with xcrun notarytool submit and staple the ticket.

On Windows, sign the produced executables (MyApp.exe and MyApp.dll in the output directory) externally for now, e.g. signtool sign /f cert.pfx /tr <timestamp> <file>.

Distributing updates after release

Once your binary is in users' hands, ship updates via Ende.autoUpdate(): bsdiff patches shipped from your own server, no app store required.