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 30:14johnb414 years agoServer 2016 virtualisation112
- 	
				 26:15 26:15johnb414 years agoServer 2008 configuration43
- 	
				 29:57 29:57johnb414 years agoServer 2008 virtualisation51
- 	
				 0:22 0:22tjmale4 years agoBrad's server test19
- 	
				 24:38 24:38johnb414 years agoServer 2016 setup and configuration38
- 	
				 6:02 6:02Arksurvivalevolved9334 years agoThe Covenant Unofficial Server "ArkMobile"17
- 	
				 12:39 12:39Toms Tech Show4 years agoSetup Microsoft KMS Server24
- 	
				 45:13 45:13Learn SQL Server with the Grumpy Old IT Guy4 years agoCreating Microsoft SQL Server Databases124
- 	
				 33:26 33:26Learn SQL Server with the Grumpy Old IT Guy4 years agoNavigating SQL Server Management Studio161
- 	
				 2:33 2:33JMLGAMiNG4 years agoDayZ Server Promotion111