frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

We rewrote our Rust WASM Parser in TypeScript – and it got 3x Faster

https://www.openui.com/blog/rust-wasm-parser
49•zahlekhan•1h ago

Comments

blundergoat•1h ago
The real win here isn't TS over Rust, it's the O(N²) -> O(N) streaming fix via statement-level caching. That's a 3.3x improvement on its own, independent of language choice. The WASM boundary elimination is 2-4x, but the algorithmic fix is what actually matters for user-perceived latency during streaming. Title undersells the more interesting engineering imo.
shmerl•1h ago
More like a misleading clickbait.
sroussey•57m ago
Yeah, though the n^2 is overstating things.

One thing I noticed was that they time each call and then use a median. Sigh. In a browser. :/ With timing attack defenses build into the JS engine.

Aurornis•55m ago
> Title undersells the more interesting engineering imo.

Thanks for cutting through the clickbait. The post is interesting, but I'm so tired of being unnecessarily clickbaited into reading articles.

socalgal2•45m ago
same for uv but no one takes that message. They just think "rust rulez!" and ignore that all of uv's benefits are algo, not lang.
estebank•30m ago
Some architectures are made easier by the choice of implementation language.
dmix•1h ago
That blog post design is very nice. I like the 'scrollspy' sidebar which highlights all visible headings.

Claude tells me this is https://www.fumadocs.dev/

sroussey•56m ago
Interesting, thanks. I need make some good docs soon.
dmix•47m ago
Good documentation is always worth the effort. Markdown explaining your products is gold these days with LLMs.
nine_k•1h ago
"We rewrote this code from language L to language M, and the result is better!" No wonder: it was a chance to rectify everything that was tangled or crooked, avoid every known bad decision, and apply newly-invented better approaches.

So this holds even for L = M. The speedup is not in the language, but in the rewriting and rethinking.

MiddleEndian•1h ago
Now they just need a third party who's never seen the original to rewrite their TypeScript solution in Rust for even more gains.
nine_k•57m ago
Indeed! But only after a year or so of using it in production, so that the drawbacks would be discovered.
baranul•40m ago
Truth. You can see improvement, even rewriting code in the same language.
spankalee•1h ago
I was wondering why I hadn't heard of Open UI doing anything with WASM.

This new company chose a very confusing name that has been used by the Open UI W3C Community Group for over 5 years.

https://open-ui.org/

Open UI is the standards group responsible for HTML having popovers, customizable select, invoker commands, and accordions. They're doing great work.

caderosche•1h ago
What is the purpose of the Rust WASM parser? Didn't understand that easily from the article. Would love a better explanation.
joshuanapoli•24m ago
They use a bespoke language to define LLM-generated UI components. I think that this is supposed to prevent exfiltration if the LLM is prompt-injected. In any case, the parser compiles chunks streaming from the LLM to build a live UI. The WASM parser restarted from the beginning upon each chunk received. Fixing this algorithm to work more incrementally (while porting from Rust to TypeScript) improved performance a lot.
evmar•41m ago
By the way, I did a deeper dive on the problem of serializing objects across the Rust/JS boundary, noticed the approach used by serde wasn’t great for performance, and explored improving it here: https://neugierig.org/software/blog/2024/04/rust-wasm-to-js....
SCLeo•31m ago
They should rewrite it in rust again to get another 3x performance increase /s
slowhadoken•26m ago
Am I mistaken or isn’t TypeScript just Golang under the hood these days?
iainmerrick•8m ago
Hmm, there's an in-progress rewrite of the TypeScript compiler in Go; is that what you mean?

I don't think that's actually out yet, and more importantly, it doesn't change anything at runtime -- your code still runs in a JS engine (V8, JSC etc).

szmarczak•12m ago
> Attempted Fix: Skip the JSON Round-Trip > We integrated serde-wasm-bindgen

So you're reinventing JSON but binary? V8 JSON nowadays is highly optimized [1] and can process gigabytes per second [2], I doubt it is a bottleneck here.

[1] https://v8.dev/blog/json-stringify [2] https://github.com/simdjson/simdjson

neuropacabra•1m ago
This is very unusual statement :-D

My heuristics are wrong. What now?

https://brooker.co.za/blog/2026/03/20/ic-leadership.html
1•vinhnx•2s ago•0 comments

Why I'm Not Worried About Running Out of Work in the Age of AI

https://kellblog.com/2026/03/19/why-im-not-worried-about-running-out-of-work-in-the-age-of-ai/
1•0bytematt•6m ago•0 comments

You're likely infected with a brain-eating virus you've never heard of

https://arstechnica.com/health/2026/03/youre-likely-already-infected-with-a-brain-eating-virus-yo...
1•jnord•9m ago•0 comments

San Francisco jury finds Elon Musk defrauded Twitter investors during takeover

https://www.courthousenews.com/san-francisco-jury-finds-elon-musk-defrauded-twitter-investors-dur...
3•jnord•10m ago•0 comments

Netryx: Open-Source Street-Level Geolocation Engine

https://github.com/sparkyniner/Netryx-OpenSource-Next-Gen-Street-Level-Geolocation
2•homarp•16m ago•1 comments

China doesn't want you to know about Operation Yellowbird

https://www.washingtonpost.com/opinions/2026/03/20/alysa-liu-olympics-arthur-tiananmen-square-china/
2•MilnerRoute•16m ago•2 comments

Musk on Mars

https://mceglowski.substack.com/p/musk-on-mars
1•adamwk•18m ago•0 comments

American heresy: should Peter Thiel be burned at the stake?

https://www.notion.so/American-heresy-should-Peter-Thiel-be-burned-at-the-stake-3274ac94ca0580d7b...
2•cratermoon•20m ago•0 comments

Snakes' ability to stand upright could inform soft robotics: study

https://seas.harvard.edu/news/snakes-plane
2•hhs•25m ago•0 comments

Fourth Amendment Law by Analogy

https://www.lawfaremedia.org/article/fourth-amendment-law-by-analogy
1•hn_acker•26m ago•0 comments

Bun vs. Node.js Performance: Why Your Event Loop Is the Real Bottleneck

https://howtocenterdiv.com/beyond-the-div/bun-is-fast-your-event-loop-is-not
1•imkyssa•26m ago•1 comments

Rewebly – Redesign any websites in seconds

https://rewebly.com
1•xavier_ber•27m ago•0 comments

How the Iran war threatens global food supply

https://www.npr.org/2026/03/20/nx-s1-5750812/how-the-iran-war-threatens-global-food-supply
12•kaycebasques•29m ago•0 comments

When Amazon and JD.com lock horns, it's shoppers that win

https://www.ft.com/content/c90aee36-1d5e-4a44-bc83-51f244ccd056
1•hhs•29m ago•0 comments

Fluux Messenger 0.14.0 – A Modern Cross Platform XMPP Client (TypeScript)

https://www.process-one.net/blog/fluux-messenger-0-14-0/
2•neustradamus•30m ago•0 comments

Tech Billionaires Renege on Giving Pledge

https://www.nytimes.com/2026/03/15/business/the-billionaire-backlash-against-a-philanthropic-drea...
1•theahura•30m ago•1 comments

Red kite with sausage roll snapped by photographer

https://www.bbc.com/news/articles/cx2g290ve2vo
2•mooreds•31m ago•0 comments

Weight-loss treatment is on the verge of a dramatic shift – again

https://www.cnn.com/2026/03/19/health/weight-loss-drugs-glp-1
2•mooreds•31m ago•0 comments

Another sodium-ion EV battery emerges in China with 4C fast charging in 11 mins

https://electrek.co/2026/03/20/sodium-ion-ev-battery-breakthrough-achieves-11-min-fast-charging/
1•breve•31m ago•0 comments

Cardea was the ancient Roman goddess of the hinge

https://en.wikipedia.org/wiki/Cardea
1•mooreds•32m ago•0 comments

We Crawled 479 Pages to Find What AI Platforms Cite – It's Not What SEO Says

https://aiplusautomation.com/blog/what-ai-platforms-actually-cite
2•anthonylee991•32m ago•0 comments

LibreOffice's native format ODF Python library, odfpy, is abandoned

https://github.com/eea/odfpy/issues/123
1•nogajun•33m ago•0 comments

Open Source becomes standard in Germany's Administration

https://www.heise.de/en/news/Administration-Open-Source-becomes-standard-11219712.html
2•doener•33m ago•0 comments

MacBook Neo, best repairability score in years, still 6/10

https://www.ifixit.com/News/116152/macbook-neo-is-the-most-repairable-macbook-in-14-years
2•hackerBanana•35m ago•0 comments

Cyberattack leaves drivers with breathalyzer systems unable to start vehicles

https://wgme.com/news/local/cyberattack-leaves-maine-drivers-with-breathalyzer-test-systems-unabl...
1•iamnothere•36m ago•0 comments

Show HN: Coding vs. Learning with LLMs

https://substack.com/@bxrne/p-191061382
1•bxrne•36m ago•0 comments

Elon Musk misled Twitter investors, jury finds

https://www.bbc.co.uk/news/articles/c62j3yl842eo
7•ColinWright•37m ago•0 comments

Google Keep Is Down

https://downdetector.com/status/google-keep/
2•ortusdux•40m ago•0 comments

For Banksy, crime does actually pay

https://www.nationalreview.com/2026/03/for-banksy-crime-does-actually-pay/
1•hhs•41m ago•0 comments

Rawq – semantic code search for AI agents (4x fewer wasted tokens, Rust, OSS)

https://github.com/auyelbekov/rawq
2•Yerzhigit•41m ago•0 comments