References Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community github GitHub github Get Started arrow_up_right
Getting Started Getting Started Architecture Architecture Application Application Window Window WebView WebView Deployment Deployment Components Components Framework Integrations Framework Integrations Examples Examples Community Community

Getting Started

Getting Started Installation Troubleshooting Release Notes Getting Started Architecture Application Window WebView Deployment Components Framework Integrations Examples Community

Installation

Boson brings together a set of components, each handling a key part of the system:

  • Runtime — acts as the bridge between your PHP code and the underlying operating system. This is the main API that you can use both in runtime and during development.

  • Compiler – allows you to build the results of your work into a finished project ready for distribution.

Technically there are more repositories and components, but the main ones are presented here.

Together, they create a seamless environment for building rich desktop applications with web technologies — without the bloat.

Requirements

  • Operating System:
    • Windows 10+ (x86 or AMD64)
    • MacOS 12+ (x86, AMD64 or ARM64)
    • Linux (x86, AMD64 or ARM64)
  • PHP 8.4+

    PHP is not required if you are building an executable from source. For development purposes only.

    • An ext-ffi extension

Linux Dependencies

The Linux OS requires a few additional dependencies:

  • gtk4 (>=4.12)
  • webkitgtk-6.0

Ubuntu

apt install libgtk-4-1 libwebkitgtk-6.0-4

Debian

apt install libgtk-4-1 libwebkitgtk-6.0-4

Debian 12 may include GTK 4.8. Make sure you have the correct version (4.12+) installed using the command:

dpkg -l | grep libgtk-4

The command will display the versions of installed packages.

libgtk-4-1:amd64          4.14.5+ds-2deb12u1  amd64 ...
libgtk-4-bin              4.14.5+ds-2deb12u1  amd64 ...
libgtk-4-common           4.14.5+ds-2deb12u1  all   ...
libgtk-4-dev:amd64        4.14.5+ds-2deb12u1  amd64 ...
libgtk-4-media-gstreamer  4.14.5+ds-2deb12u1  amd64 ...

Fedora

dnf install gtk4 webkitgtk6.0

FreeBSD

pkg install webkit2-gtk4

Runtime

Boson runtime provides the core of the library and allows you to run your wonderful applications.

Library is available as Composer repository and can be installed using the following command in a root of your project:

composer require boson-php/runtime

Don't forget to include the autoload file in your application.

<?php

require __DIR__ . '/vendor/autoload.php';

$app = new Boson\Application();

Compiler

Boson compiler gives you the ability to assemble the result of your work into a final product. That is, into an executable file for the target platform.

Library is available as Composer repository and can be installed using the following command in a root of your project:

composer require boson-php/compiler --dev

The compiler is only required for development, it is not required for code execution, so it is recommended to include it as a --dev package.

github discord telegram Get started Documentation Contribution Guide License Release Notes BOSON PHP © 2025. All Rights Reversed.