How can I render Typst documents on a website?

I have a complex document with many options. I want people to be able to pick which sections are included, the text size, and a few other bits and pieces. I have created the Typst document such that it reads configuration settings from a JSON file. And I have separately created a website with buttons which creates the JSON. I would like to embed the Typst WASM plugin and Typst file into the website, so people can generate the version of the document they want on demand.

Has anyone managed to do this?

I found a project on GitHub which claims to help, but all I can get out of it are javascript syntax errors.