Wasm vs swish and others

It is indeed not very well documented :frowning: If you build the WASM version inside the source, say in the build directory build.wasm, you can run the demos using (from build.wasm)

swipl ../src/wasm/server.pl

Note that swipl is not the WASM version, but the version for the host platform.

That does not include Tinker. To get that, go to src/wasm/demos and create a symlink to the checked out tinker repository. Run yarn in the tinker directory to download the JavaScript dependencies. Now restart the above service and you should see Tinker as one of the demos.

The service running at wasm.swi-prolog.org basically does that, though packages slightly different. So, in addition to the tinker repo, you need

  • The JavaScript dependencies by running yarn in the repo
  • The SWI-Prolog WASM bundle
  • An HTTP server. The src/wasm/server.pl is a Prolog based HTTP server. Any server will do though.

Many thanks Jan, it works now !
With your email and also with help of IA: