mirror of
https://github.com/danog/ext-php-rs.git
synced 2024-11-26 20:15:22 +01:00
commit
57c53b6734
@ -4,7 +4,7 @@ Using `#[php_async_impl]` instead of `#[php_impl]` allows us to expose any async
|
|||||||
|
|
||||||
This allows full compatibility with [amphp](https://amphp.org), [PSL](https://github.com/azjezz/psl), [reactphp](https://reactphp.org) and any other async PHP library based on [Revolt](https://revolt.run).
|
This allows full compatibility with [amphp](https://amphp.org), [PSL](https://github.com/azjezz/psl), [reactphp](https://reactphp.org) and any other async PHP library based on [Revolt](https://revolt.run).
|
||||||
|
|
||||||
Traits annotated with `#[php_impl]` can freely expose any async function, using `await` and any async Rust library.
|
Traits annotated with `#[php_async_impl]` can freely expose any async function, using `await` and any async Rust library.
|
||||||
|
|
||||||
Make sure to also expose the `php_tokio::EventLoop::init` and `php_tokio::EventLoop::wakeup` functions to PHP in order to initialize the event loop, as specified in the full example [here »](#async-example).
|
Make sure to also expose the `php_tokio::EventLoop::init` and `php_tokio::EventLoop::wakeup` functions to PHP in order to initialize the event loop, as specified in the full example [here »](#async-example).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user