Premium Only Content
PHP's Embed Server API (SAPI) In Rust
Just a short example of using using PHP's "embed" SAPI in a Rust program, instead of a C program.
There was a few tricks to get this to work, and this example is not complete. But it's a start.
The first thing to do was to get the PHP source code. I had to build the source using the --enable-embed option, which builds the Server API php_embed, which is a C library.
I then used bindgen to generate Rust bindings from the C header files for the libphp.so shared object file.
Once I had bindgen generate the rust bindings, instead of including this Rust library in my project, I just copied out the bindings file to my project. This means that my project needs to link to the libphp.so library.
Oh, and I said I would show you where I put the "bindings.rs" file; I created a "php" mod, and dumped it in there.
For IT, Software, & Data Privacy Consulting, please visit:
-
30:14
johnb41
3 years agoServer 2016 virtualisation
65 -
26:15
johnb41
3 years agoServer 2008 configuration
21 -
29:57
johnb41
3 years agoServer 2008 virtualisation
29 -
0:22
tjmale
3 years agoBrad's server test
19 -
24:38
johnb41
3 years agoServer 2016 setup and configuration
38 -
6:02
Arksurvivalevolved933
3 years agoThe Covenant Unofficial Server "ArkMobile"
17 -
12:39
Toms Tech Show
3 years agoSetup Microsoft KMS Server
22 -
45:13
Learn SQL Server with the Grumpy Old IT Guy
3 years agoCreating Microsoft SQL Server Databases
108 -
33:26
Learn SQL Server with the Grumpy Old IT Guy
3 years agoNavigating SQL Server Management Studio
142 -
2:33
JMLGAMiNG
3 years agoDayZ Server Promotion
109