HackerTrans
TopNewTrendsCommentsPastAskShowJobs

le_chuck

no profile record

Submissions

Show HN: Yet another self-hosted web analytics with no UI but MCP

yetanotherwebanalytics.dev
3 points·by le_chuck·18 दिन पहले·0 comments

Show HN: Kyushu – A self-hostable WASM sandbox for JavaScript workers

kyushu.dev
89 points·by le_chuck·पिछला माह·39 comments

[untitled]

1 points·by le_chuck·8 माह पहले·0 comments

comments

le_chuck
·पिछला माह·discuss
*Update*: Done. `kyu dev` is implemented and released :)
le_chuck
·पिछला माह·discuss
*Update:* I've got a draft PR for `kyu dev` with live reload.
le_chuck
·पिछला माह·discuss
I haven't benchmarked it yet but, guts feeling, would expect it to be (a bit?) slower. Cloudflare has likely spent quite some effort optimizing it and also runs fast machine. Kyushu uses QuickJS which adds a layer that needs to be loaded but, it's pre-initialization in memory which should mitigate the cost.
le_chuck
·पिछला माह·discuss
I wouldn't rush and jump straight to it at this point, as mentioned it's early and relatively experimental at this point, but technically, at least for relatively simple function, yes.

As a matter of fact, I did it myself in one of my pipelines. Here's the related PR https://github.com/peterpeterparker/blog-to-newsletter-worke...
le_chuck
·पिछला माह·discuss
I did quite a market research to gather them ;)
le_chuck
·पिछला माह·discuss
Yeah I was surprised by this when I opened their website.

Your setup - Rust/WASM kernel + Service worker - sounds really sweet. If already public, please do share the link, else looking forward to your launch!
le_chuck
·पिछला माह·discuss
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.
le_chuck
·पिछला माह·discuss
Thanks! It's actually the first time I started "designing" (I'm definitely not one) everything by picking the theme for the code snippets first. That's why the same colors are reused on the site and even in the logo.
le_chuck
·पिछला माह·discuss
Haha, glad someone noticed those testimonials ;)

Others mentioned better use cases than I could probably come with. Not sure it's a strong use case but, one thing I could maybe mention too is the fact that it ships as a standalone artifact. It's portable and, if reproducible, can provide some sort of guarantee on what's effectively running for those who care.
le_chuck
·पिछला माह·discuss
Thx! I thought about adding a context to the fetch handler, could be handy for local testing. Likewise, local commands (e.g. dev or watch mode) are not yet there. Those would be next on the line if the CLI starts getting used by others than me.