Commit Graph

16 Commits

Author SHA1 Message Date
David Cole
0056db3392 Fix docs build 2021-09-05 18:00:52 +12:00
David
b50a6c64bf
Allowlist types generated by bindgen (#60)
* Allowlist types generated by bindgen

Tidied up build script as well, layout tests are no longer generated
unless `EXT_PHP_RS_TEST` env variable is set. Much quicker build times
and smaller output size.

* Fix build

* Override Rust toolchain when running CI
2021-09-05 17:56:29 +12:00
David Cole
20e8c16ff0 Build docs on nightly 2021-09-05 14:24:56 +12:00
David Cole
31a1e3d5e1 Document features, fix documentation links 2021-09-05 14:18:03 +12:00
David
4a4370c817
Add ability to send Rust closures to PHP (#58)
* Start work on returning new objects

Change `IntoZval` to consume `self`

* Add conversion from vector reference to PHP hashtable through clones

* `set_binary` now only takes `Vec`

Used to take `AsRef<[T]>` to allow users to pass arrays, however, this
causes the data to be cloned even if the user passes a `Vec`.

* Rename `as_zval` to `into_zval` to match Rust conventions

* Started work on closures

* Finish implementation of closures

* Document closures, add to prelude, feature gate

* Fixed closure example
2021-09-05 13:45:59 +12:00
David Cole
46de219ea9 Run cargo and mdbook tests on build 2021-08-22 01:33:22 +12:00
David Cole
a2cc921ab0 Use binary mdbook rather than compiling 2021-08-22 01:24:51 +12:00
David
bd84f28054
Added ext-php-rs guide (#52)
* Started work on guide, added types

* Rewrite argument parser to allow referencs

Primarly so that `&str` is a valid parameter type.

* Remove generic `Into<String>` conversion to exception

* Worked on guide, added macros

* Build guide when building docs

* Allow manual trigger of docs build

* `cargo fmt`
2021-08-22 01:00:14 +12:00
David
0db6888c46
Added support for PHP ZTS (#37)
* Added support for PHP ZTS

* Added GitHub action for ZTS

Runs seperate from the other tests, as the setup-php action does not
support ZTS, therefore we run the tests in a Docker container.

* Source Rust env file before building

* No `source` command on docker

* Another attempt at fixing Rust in Docker
2021-05-19 20:45:39 +12:00
David
fcdd9332f5
Build and deploy docs to Github pages (#35)
* Added Github action for building and publishing docs

* Create index redirect page for docs

* Only deploy on master, fixed redirect
2021-05-04 11:42:52 +12:00
David
d1e719ef7a
Only run CI on pushes to master and PRs 2021-04-24 13:29:53 +12:00
David Cole
5f89a5f970 Fixed typo v2 2021-04-17 00:25:07 +12:00
David Cole
b08fad5aad Fixed typo 2021-04-17 00:20:17 +12:00
David Cole
53e69f3820 Fixed CI by installing LLVM 2021-04-17 00:17:02 +12:00
Will Browning
cea3cb2dc4
Updated Bindgen to 0.58.1 (#20)
* Update bindgen

* Fix failing test

* Add env llvm and libclang variables

* Fixed doc comment for table macros

* Removed newline

Co-authored-by: David Cole <david.cole1340@gmail.com>
2021-04-17 00:05:17 +12:00
David
e1ca2129fe
Add github actions for building and linting (#12)
* Added github build workflow

* Added lint workflow

* Fixed clippy errors

* Fixed clippy warnings

* Allow warnings on generated code

* Final clippy fix... hopefully
2021-03-11 13:41:05 +13:00