Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 19:38
· 37 commits to main since this release
296405c

Nativella runs a Symfony, Laravel or plain PHP app as a desktop app, with PHP inside the app process.

What's new since 0.1

  • intl. The PHP inside the executables has the intl extension: numbers and dates formatted for a locale, collation, transliteration, the Intl component of Symfony and its forms, the Number helper of Laravel. ICU and its data, for every locale, add 36 MB to each executable: nativella-linux-x86_64 goes from 51 to 87 MB. Phones still have no intl.

  • Android apps without the Android tools. nativella android makes the APK of a project from the template APK of this release, in seconds, with no JDK, Android SDK, NDK or Rust on the machine:

    nativella android path/to/project --template nativella-android-template-arm64.apk -o dist/notes.apk

    Take the command and the template from the same release: nativella android warns when they differ. The APK is signed with APK Signature Scheme v2, with --key, an EC P-256 private key in PKCS #8 PEM, or else with a debug key that nativella makes once per computer. The Android application ID is the identifier of the project, its dashes as underscores. Not there yet: the icon of the project (the APK has the template's), downloading the template, Java keystores, Google Play bundles (AAB), x86_64, and iOS on the same model. It is experimental, tested on an Android 16 emulator, not on a phone. See Mobile.

  • The PHP packages are on Packagist: composer require nativella/symfony-bundle, nativella/laravel or nativella/nativella, with no clone of the repository. The bundle and the Laravel package bring nativella/nativella. They are split from packages/ of this repository to read-only repositories, and released with the same version as the nativella command: issues and pull requests still go here. See Installation.

  • The Symfony web debug toolbar works in the app. It stayed on "Loading…": its script fetched http://localhost/_wdt/…, outside the app. The runtime rewrote the absolute URLs of HTML and CSS, not the requests of scripts: those of fetch(), XMLHttpRequest and EventSource to http://localhost/… now reach the app too.

  • nativella build names the local overrides it leaves out. .env.local and the other paths ending with .local never ship, but they were left out silently: an APP_ENV=prod set there did not reach the executable. nativella build and nativella bundle now list them, with how to ship the production environment: a file that ships, like the .env.local.php of composer dump-env prod.

  • Credentials. Building a standalone app says where each kind of credential goes: the secret of the framework is each installation's own, those of the user go to the keychain, yours stay on a server of yours, and only keys made to be public ship.

  • nativella alone prints the help: the list of the commands, with a line each. It used to run the project of the current directory, as nativella <project-dir> did: run a project with nativella run [<project-dir>].

Upgrading from 0.1

nativella and nativella <project-dir> no longer run a project: use nativella run or nativella run <project-dir>.

An application that took the packages from a clone of the repository: remove the path repository from its composer.json, then require the packages with ^0.2, as before 1.0 ^0.1 does not accept 0.2. With Symfony, for example:

composer require nativella/nativella:^0.2 nativella/symfony-bundle:^0.2

Under the hood

  • On Linux, the static PHP builds with gcc instead of zig, for the C++ of ICU: the process has a single C++ runtime, the libstdc++ that WebKitGTK loads. The executables still need glibc 2.35, and the release checks that they need no libstdc++ newer than the one of Ubuntu 22.04 (GLIBCXX_3.4.30).
  • The Composer dependencies are up to date: the Symfony demo has Symfony 8.1.9, which fixes CVE-2026-109449 in symfony/expression-language.
  • The CI runs each job only on the changes that can break it, with one workflow per group of jobs.
  • Dependabot updates the Composer, Cargo and Docker dependencies too, one pull request per ecosystem. Its first round is in: Tauri 2.12.3, ext-php-rs 0.16.2, p256 0.14 and sha2 0.11 (a test pins the certificate of the APK signature, so apps signed with a key keep updating), Twig CS Fixer 4, Debian 13.7 and Traefik 3.7.14 in the development stack. jni stays on the version Tauri uses.
  • The APK and the bundle that the Mobile workflow passes from one job to another expire after a day.
  • The test of the Laravel demo accepts its native calls at boot in any order, as Laravel discovers its listeners in the order of the filesystem.

Try it

Download the Symfony demo for your platform below, nativella-demo-symfony-linux-x86_64 or nativella-demo-symfony-macos-aarch64: one executable, PHP inside. Make it executable with chmod +x <file>, then run it.

  • On Linux, it needs glibc 2.35 or later and the system webview, WebKitGTK 4.1: sudo apt install libwebkit2gtk-4.1-0, sudo dnf install webkit2gtk4.1 or sudo pacman -S webkit2gtk-4.1 (see Installation for the other distributions).
  • On macOS, the executable is not signed: xattr -d com.apple.quarantine <file> after downloading it with a browser.

Then read Getting started to run your own app. Nativella is experimental: read Limitations and roadmap first.

Files

nativella-<platform> runs a PHP project (nativella run <project-dir>)
and builds standalone applications (nativella build);
nativella-demo-*-<platform> are the demos, as standalone applications.
SHA256SUMS-<platform> holds their checksums.

They are linked against a static PHP 8.5: they need no PHP on the machine.

Linux x86_64: glibc 2.35 or later (Ubuntu 22.04, Debian 12, Fedora,
RHEL 10, Arch…), and the webview of the system, WebKitGTK 4.1, to run:
sudo apt install libwebkit2gtk-4.1-0, sudo dnf install webkit2gtk4.1
or sudo pacman -S webkit2gtk-4.1. An application with a tray icon needs
the library of the tray too. The packages of each distribution:
https://lyrixx.github.io/nativella/docs/installation/#linux-x86_64

macOS arm64: they need nothing installed. They are not signed: downloaded
with a browser, remove the quarantine first, with
xattr -d com.apple.quarantine <file>.

Android arm64: nativella android <project-dir> --template nativella-android-template-arm64.apk makes the APK of a PHP project of
this template, with the nativella command of the same release.