Download the PHP package php-io-extensions/metal without Composer
On this page you can find all versions of the php package php-io-extensions/metal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-io-extensions/metal
More information about php-io-extensions/metal
Files in php-io-extensions/metal
Package metal
Short Description PHP-Controllable macOS Metal + AppKit window, menu, texture, input, and drawing extension
License MIT
Informations about the package metal
php-metal
PHP extension for Apple Metal + AppKit — built with Zephir, installable via PHP PIE.
metal is a standalone macOS-only binding: open an NSWindow, install a macOS
menu bar, draw through a CAMetalLayer with Metal, create offscreen
MTLTexture targets (0.7.1+) for headless engines/UIs, and blit those textures
into a live window (Window::presentTexture, 0.7.2+). It has no knowledge of
other windowing libraries.
PHP API is namespaced under Metal\MTL\… as static classes. Opaque native
handles are int values.
Requirements
| Component | Minimum version | Notes |
|---|---|---|
| PHP | 8.2 | ZTS and NTS |
| OS | macOS | arm64 + x86_64 (PIE os-families: darwin) |
| Frameworks | system | Metal, AppKit, QuartzCore, Foundation |
| Compiler | Apple Clang | Objective-C ARC |
php-dev / phpize |
matches PHP | Required for non-PIE builds |
Installation
Via PHP PIE (recommended)
macOS only — configure fails on other platforms.
Platform installer
Laravel Herd:
Manual build (maintainers)
scripts/prepare-ext.sh regenerates Zephir C, syncs src/ into ext/src/,
patches config.m4, installs Makefile.frag for .m sources, and strips
phpize junk so the committed ext/ tree stays PIE-ready.
Use
make -j1(or the installer). Parallel make is fine for.cobjects; the ObjC fragment is conservative.
Quick start
Demo:
API surface (0.7)
| Class | Role |
|---|---|
Metal\MTL\App |
NSApplication init / poll / quit |
Metal\MTL\Window |
NSWindow + CAMetalLayer clear/present |
Metal\MTL\Menu |
Menu bar + custom items / Quit |
Metal\MTL\Device |
MTLDevice / command queue handles |
License
MIT — see LICENSE.