SQLite for Production. Powered by libSQL.
PHP Versions | Build Versions |
---|---|
8.1 | TS / NTS |
8.2 | TS / NTS |
8.3 | TS / NTS |
8.4 | TS / NTS |
Note: TS (Thread Safe), NTS (Non Thread-Safe). Support for: Linux/ Mac/Darwin / Windows/WSL
Installing the extension should be not complecated, it's easy and like using Composer Package Installer. Or, if you belive with this quotes:
If there is a hard way, why choose the easy way?
— Me
So you need to go with the Manual Installation.
Auto Installer
turso-php-installer
is a Composer package capable of executing various commands related to libSQL, simplifying the development process, and making it easier to simulate in a local environment.
composer global require darkterminal/turso-php-installer
Add to PATH
variable:
export COMPOSER_BIN_DIR=$(composer config --global home)/vendor/bin
We have two options to install the extension using the installer:
Interactive Mode
turso-php-installer install
Non-interactive Mode
turso-php-installer install -n --php-version=8.3
Manual Installation
Download the latest build extension/driver binary you can see at release page.
- Extract the archive
- Locate somewhere in your machine
- Copy a relative path that address that extension/driver
- Open
php.ini
search;extension
if you usingnano
(ctrl+w
) then searching for it - add in the next-line
extension=liblibsql_php.so
(in Linux) without;
at the begining
Check on your console/terminal
php --m | grep libsql
- Unix/Unix Like
- PHP >= 8.1
- Rustlang
- Git
- Docker & Docker Compose (Docker Development)
Fork it First and Build from source:
# Clone
git clone git@github.com:<username>/turso-client-php.git
# Move to project directory
cd turso-client-php
# Make sure you have rust nightly toolchain
rustup toolchain install nightly
rustup default nightly
# Build the binary
cargo build # or cargo build --release for production
Or using Develop inside Docker Container
# Clone
git clone git@github.com:<username>/turso-client-php.git
# Move to project directory
cd turso-client-php
# Build the binary
make compose/up
if using arm64
then use this command:
make compose-arm64/up
For all make command check make help
The MIT License (MIT). Please see License File for more information.