[gambit-list] Size of the universal libraries (eg. lib/_gambit.php)

Nicolas Hurtubise nicolas.k.hurtubise at gmail.com
Thu Jun 8 12:03:29 EDT 2017

Hi !

We're currently working on improving the universal backend, there are a 
few opened issues on this subject : https://github.com/gambit/gambit/issues

> 1. AFAIK you have to cat 3 files code.php (compiled) code_.php (linked)
> and lib/_gambit.php (precompiled) into a standalone script. The step
> where you compile to code.php (gsc -:=. -target php code.scm) gives me a
> code.o1 file. Is this a bug?
You can now do :

gsc -target php -exe code.scm

Which will cat the required files in a single executable php script. 
(You still need to precompile lib/_gambit.php)

> 2. The precompiled library (_gambit.php) is 15 Mb of size. So the first
> thing I've tried to do is to reduce the size of this file.
Marc is currently working on this issue : 
To make a long story short, there already is a procedure in the 
compilation process that can drastically shrink the size of the compiled 
programs by including only what's required, but as soon as you include 
(eval), you have no choice but to compile everything...
For various reasons, (eval) tends to be included more often than you'd 

With a few tweaks, it is possible to get small executables for small 
programs (~0.01M for a Hello World instead of 15M), but it's not yet 
convenient to do. Maybe Marc can tell you more about that if you are 


More information about the Gambit-list mailing list