logoalt Hacker News

le_chucktoday at 3:46 PM1 replyview on HN

I had previous experience with QuickJS - respectively using the rquickjs crate (awesome project) - so my approach was first asserting whether it was possible to run a Wasmtime binary that both executes the JS code and handles HTTP requests and responses.

Then, the second part which was really important to me, was figuring out if I could find a way to embed the developer's JS code within the worker without requiring them to install Cargo. (thanks to Wizer it's possible, love it).

Once I had those two, the rest was basically execution (not saying it was straightforward though ;)

I was also a bit lucky: at the same time as I was developing it, Rolldown announced the version 1 of their standalone crate. So it was the perfect timing to use it as well.

As for StackBlitz WebContainers, I actually don't know much about it. They run in the browser as I understand, so fundamentally different but, feature wise I'm sure this project is way more mature and therefore offers way more features.


Replies

binyutoday at 3:58 PM

Awesome, thanks for detailing the thought flow and choices that led you here. I chose not to go the QuickJS route for performance reasons but I think it's a solid choice depending on the use case.

> They run in the browser as I understand, so fundamentally different

Yes, runs entirely in the browser, while this is a hosted product. StackBlitz technology is really good but it is closed source.

show 1 reply