This is awesome to see!<p>I have been working on something like this for a while too. But it uses GraalVM and it's "Polyglot" runtime to provide support for JS/Ruby/Python/WASM/LLVM languages.<p>It's packaged as a single binary using graal-native + Quarkus, or if you don't care about that (faster startup time/lower memory use/no JVM needed) but need maximum performance, you can run it as a regular JVM service as well.<p>It was born out of a need for a polyglot Functions-as-a-Service platform but without the weight of container orchestration -- I needed something I could deploy as a single binary.<p>Essentially OpenFaaS/OpenWhisk, minus containers.<p>It doesn't use CGI as a request/response specification though, it uses Vert.x "RoutingContext" interface which has methods like <i>".getBodyAsJson()"</i>, <i>".params('something')"</i>, <i>".header('foo')"</i>, etc.<p><pre><code> https://vertx.io/docs/apidocs/io/vertx/ext/web/RoutingContext.html
</code></pre>
An open standard like CGI probably would have been better, but Graal has marshalling facilities for sharing object types between languages, so the most user-friendly/ergonomic thing to do was to share the underlying web request object itself across language boundaries, including all the methods you can call on it.<p>---<p>This has given me motivation to finally finish it so I can publish + open-source it!
Does WebAssembly even make sense as a standalone runtime, like the JVM? Is "server-side WebAssembly" going to be "a thing", or is it just a compatibility kludge?<p>And what of all these languages that compile to JS, like Typescript, Reason, Kotlin, et al? Is JS a sound "IR" between the frontend and WebAssembly? Or would it be better to compile things directly to WebAssembly?
I was working on something similar but I found that without interface types[1] you end up with a platform that's kinda primitive and pretty unergonomic. I honestly expect to see an explosion of projects in this vein once interface types are a real thing.<p>[1]: <a href="https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md" rel="nofollow">https://github.com/WebAssembly/interface-types/blob/master/p...</a>
so this is like WSGI? The almost 30 year old design pattern that blocks on requests waiting for a response from the downstream app and really isn't scalabe?