ext-php-rs
ext-php-rs copied to clipboard
Bindings for the Zend API to build PHP extensions natively in Rust.
I have been struggling trying to implement the following: ```php
Hi, PHP 8.0 introduced union types, PHP 8.1 intersection types, and PHP 8.2 will ship with [DNF types](https://wiki.php.net/rfc/dnf_types). There is currently no way to express these in this library, so...
Currently, the `#[prop]` attribute does not handle case conversion, so we must resort to: ```rust #[php_class] struct Foo { #[prop(rename = "isBar")] pub is_bar: bool, } ``` which can quickly...
| Component | Version | | :--- | :---: | | ext_php_rs | git:master | | cargo-php | v0.1.7 | Extension code ```rust #[php_class] pub struct Foo; #[php_impl] impl Foo...
| Component | Version | | :--- | :---: | | ext_php_rs | git:master | | cargo-php | v0.1.7 | Extension code: ```rust #[php_class] pub struct Example { #[prop] pub...
Hi! When using the builder APIs, classes/functions are properly registered but their stubs are not generated. | Component | Version | | :--- | :---: | | ext_php_rs | git:master...
Hi, currently the following is not possible: ```rust #[php_class] struct Foo { #[prop] bar: Bar, } #[php_class] #[derive(Clone)] struct Bar { #[prop] value: String, } ``` ``` the trait bound...
When using the getter/setter macros, the property is created, but the accessor methods are exposed to php. Also, the generated property is not exposed to the Reflection API. ```rust #[php_class]...
Currently, `extends` and `implements` only accept a `&zend_class_entry` as a parameter. This makes it impossible to export an idiomatic type hierarchy from rust to php (without using the raw builders...
Hi, It would be nice to be able to declare interfaces using traits instead of structs, so that the following example would work: ```rust #[php_interface] pub trait Greeter { fn...