Installation
AI assistant
Build this with Claude Code, Cursor or Copilot
Copy a Tessero-tuned prompt for Installation, grounded in 16 real API signatures , into your IDE's AI. No chatbot, just exact context.
Packages not published yet. Tessero is not on Packagist yet and has no tagged release, so there are no prebuilt binaries. The package-name install commands on this page do not work yet. The install page has the commands that work today.
Tessero needs PHP 8.2 or newer on a 64-bit platform. Pick one backend (or install both; the Laravel package uses the extension when it is loaded and falls back to FFI otherwise).
Option A: the FFI package (no compiler needed)
composer require tessero/tessero vendor/bin/tessero doctor
Requirements:
ext-ffi(bundled with PHP; on Debian/Ubuntu it is part ofphp8.x-common; on the official Docker images rundocker-php-ext-install ffi).ffi.enable=1for the CLI, orffi.enable=preloadplus the preload script for PHP-FPM ([Deployment(https://github.com/DMJ-CV-91913/tessero/blob/main/docs/operations/deployment.md)).- A prebuilt
libtesserofor your platform invendor/tessero/tessero/lib/<os>-<arch>/. Release packages carry linux-x86_64, linux-aarch64, linux-musl-x86_64, darwin-arm64, darwin-x86_64 and windows-x86_64. On anything else runvendor/bin/tessero build(needs a C compiler) or setTESSERO_LIBto a library you built. - For linear algebra only: an LP64 OpenBLAS with LAPACKE
(
apt install libopenblas0 liblapacke,apk add openblas lapack,brew install openblas). The copy bundled withpip install scipyis found automatically. SetTESSERO_BLASto use another build. ILP64 builds are refused because they would silently truncate indices. - Supported LAPACK: 3.11 or newer (Ubuntu 24.04, current Debian, Homebrew, the SciPy wheels). On LAPACK 3.10
(Ubuntu 22.04) Tessero runs safely, with workarounds for two LAPACKE 3.10 defects, but four functions may
return different though valid values:
signal.savgol_filterandlinalg.eig_banded(eigenvector signs),linalg.subspace_angles(a tiny angle returned as 0) andlinalg.ordqz(sign and last digits). CI checks that 3.10 runs without a crash or any other difference.
Option B: the native extension
pie install tessero/tessero-ext
or from a source checkout:
cd ext phpize ./configure --enable-tessero # --disable-tessero-openmp to drop libgomp make -j make test # 12 phpt files sudo make install echo "extension=tessero" | sudo tee "$(php-config --ini-dir)/30-tessero.ini" php --ri tessero
The extension compiles its own copy of the kernel (ext/libtessero/), so it
needs neither ext-ffi nor the FFI package. It does not include LAPACK-based
linear algebra, multi-axis reductions or .npy I/O yet; install the FFI
package alongside it when you need those ([Choosing a backend(https://github.com/DMJ-CV-91913/tessero/blob/main/docs/getting-started/choosing-a-backend.md)).
Option C: Laravel
composer require tessero/laravel # pulls tessero/tessero php artisan vendor:publish --tag=tessero-config # optional: config/tessero.php php artisan tessero:doctor
The service provider is auto-discovered. See the [Laravel guide(https://github.com/DMJ-CV-91913/tessero/blob/main/docs/guide/laravel.md).
Check the installation
vendor/bin/tessero doctor
doctor reports the PHP version, whether ext-ffi is loaded and what
ffi.enable is set to, whether a binary exists for this platform and loads in
this SAPI, the SIMD level the kernel selected (baseline, AVX2, AVX-512, NEON),
OpenMP support, and whether an LP64 OpenBLAS with LAPACKE was found. Each
failing line says what to install or set.
vendor/bin/tessero info prints the same facts as JSON (for monitoring), and
vendor/bin/tessero php-ini prints the preload lines for your paths.
Build the kernel yourself
make -C csrc # lib/<os>-<arch>/libtessero.{so,dylib,dll} make -C csrc test # 174 C checks make -C csrc sanitize # the same under ASan + UBSan make -C csrc OPENMP= # without OpenMP
GCC 9+ or Clang 12+ on Linux; Apple Clang on macOS (built without OpenMP); MinGW-w64 on Windows.