With a lot of help from Claude Code, I managed to put together a proof of concept version of full Racket running in a browser:
It's based on an emscripten build of Chez Scheme with interpreted platform independent bytecode (tpb32l). Continuations, threads, and some native packages work.
The code is in the repository below. It's a bit of a mess, as I attempted to get the WASM build integrated into the Racket build process. In retrospect, that may have been a mistake. If anyone is interested, I can try to write up some notes about how it works. (The repo contains a build-wasm.md with AI-generated notes, though I can't attest to their accuracy.)
Is it on purpose, that there is no Issue tab on the Github repo?
Anyways, I tried:
(require math/number-theory)
This leads to an error, since the collection is not found.
The error message displayed doesn't match the normal Racket one though.
The problem is that it is very long.
At some point it even includes a pdf (or ps) document in text format.
The missing Issues tab was unintentional. I just added it to the repo.
Thanks for the bug report. I created an issue for it. It looks like somehow the the content of a PDF ended up in the collection search path which I confirmed with (current-library-collection-paths). I'll dig into it.
i realize how it is hard to understand a post on an interesting complex topic, and this work is big (WASM ,Racket ,etc ...) when you are completely out of context, so, sorry if my questions are not smart:
i do not even realize if the code is running remotely or on my local machine but i bet it is in the browser?
should it be possible to have a way in this system to install package from the racket repository, that would make it a great tool for testing all the power of racket without installing it?
Adding the ability to install packages is a good idea. It may be complicated by browser cross-site security rules. I'll add it my todo list to investigate.
Baking more packages into this distribution is relatively simple, particularly for packages that don't require native shared libraries. If anyone has any suggestions for packages that would do a good job showing off Racket's capabilities, I'm happy to try adding them.
There is also a WASM in Guile scheme, Hoot named if i remember well.
I was thinking of a package but it requires another package that it uses native shared libraries. So not a good idea. But perheaps i will use your project to host racket application on the internet.