[gambit-list] Gambit universal library in the browser

Marc Feeley feeley at iro.umontreal.ca
Tue Mar 24 22:49:38 EDT 2020

With the latest commit the Gambit universal library can be used in the browser… it is as simple as:

 % make _gambit.js
 % gsc/gsc -:= -target js -exe -o webapp.js webapp.scm
 % open webapp.html


 (declare (extended-bindings))

 (define (document.write html)
   (##inline-host-statement "document.write(g_scm2host(@1@));" html))

 (document.write "<h1>Hello world!</h1>")


 <!doctype html>

     <meta charset="utf-8">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

     <script type="text/javascript" src="webapp.js"></script>


More information about the Gambit-list mailing list