https://github.com/ptondereau/ext-redlock-php
PHP Extension built with Rust to implement redlock alogirthm
https://github.com/ptondereau/ext-redlock-php
php rust
Last synced: 5 months ago
JSON representation
PHP Extension built with Rust to implement redlock alogirthm
- Host: GitHub
- URL: https://github.com/ptondereau/ext-redlock-php
- Owner: ptondereau
- Created: 2022-06-08T12:55:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T20:35:58.000Z (almost 3 years ago)
- Last Synced: 2024-12-31T09:21:51.319Z (5 months ago)
- Topics: php, rust
- Language: Rust
- Homepage:
- Size: 95.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redlock algorithm implementation for PHP in Rust
[](https://github.com/ptondereau/ext-redlock-php/actions/workflows/tests.yml)
## Requirements
- [`cargo-php`](https://crates.io/crates/cargo-php)
- PHP with `php-dev` installed >= 8.1
- Rust >= 1.61
- CLang 5## Generating PHP stubs
[`cargo-php`](https://crates.io/crates/cargo-php) have a builtin feature to generate stubs but it's not finalized and stable enough. We use for the moment https://github.com/sasezaki/php-extension-stub-generator to generate with this current usage:
```bash
$ cargo build
$ php \
-dextension=target/debug/libext_redlock_php.so \
php-extension-stub-generator.phar dump-files ext-redlock-php stubs
```## What is redlock?
https://redis.io/docs/reference/patterns/distributed-locks/
## TODO
- [ ] Build for all supported versions of PHP
- [ ] Create release artifacts for all PHP versions and OS plaform.