oraoto / pib

PHP in Browser (powered by WebAssembly)
https://oraoto.github.io/pib/
Apache License 2.0
956 stars 112 forks source link

Composer packages #22

Closed ricomonster closed 5 years ago

ricomonster commented 5 years ago

Does pib supports implementation of composer packages?

oraoto commented 5 years ago

What do you mean by implementation of composer packages?

PIB is just a PHP interpreter running inside a browser. If you want to use compose packages, you can package or load dynamically the entire vendor folder into emscripten filesystem and include vendor/autoload.php as usual.

ricomonster commented 5 years ago

I assume by you saying including to emscripten filesystem is by using the flag --preload-file?

oraoto commented 5 years ago

Yeah, --preload-file or load the file in JavaScript.

ricomonster commented 5 years ago

i have it loaded but after i included include('vendor/autoload.php'); in the code, the succeeding code below it doesn't seem to run.

i set the assertions flag to 1 and when i run the code, it show this message: Calling stub instead of sigaction()

oraoto commented 5 years ago

What composer packages are you using?

filips123 commented 5 years ago

@oraoto

Is it also possible to include files and directories (composer's vendor directory) dynamically after building? Or to dynamically build them? What do you mean with "load the file in JavaScript"?

Also, is it possible to preload directory (instead of --preload-file)?