frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Nectar, a Rust-like React that compiles to WebAssembly

https://buildnectar.com
20•blakeburnette•6d ago
After a pretty rough gig experience, I wanted to remind myself that I was a vaguely capable developer. I had recently jumped on the Rust train and wanted a Rust equivalent of React that is more performant and easier to work with. I also wondered if I could effectively eject Javascript. This project came from that... Nectar is a programming language that compiles your entire app, logic, state, and rendering, to WebAssembly. JavaScript is reduced to a roughly 10 KB syscall layer that only bridges WASM to the DOM.

The origin: I set out to get React-style ergonomics with better performance, and about halfway in I realized I had hit the ceiling of what was possible going through the browser's DOM (Blink/C++) and a diffing step. So I stopped fighting it and built my own signal-driven rendering layer that compiles to WASM and updates exactly the DOM nodes that changed, in O(1), with no virtual DOM and no garbage collector.

What it is right now:

- One binary. The same compiler does formatting, linting, testing, a dev server, an LSP, and SSR (although SSR is underdeveloped). - Fine-grained signals. Each binding updates on its own, so there is no diffing pass. - A Rust-inspired borrow checker for compile-time safety. - Language-level keywords for the patterns you reach for constantly on the web: component, store, router, form, auth, payment. - SEO and Screen Readers. It compiles to two DOMs from the same source so the app stays visible to screen readers and crawlers.

Honest status, because this is early and it is mostly one person:

- The "no JavaScript" line has an asterisk. WASM cannot touch the DOM directly, so there is a small JS bridge (about 10 KB) that as of this moment I cannot overcome on major browsers. - The numbers on the site (a counter is ~10 KB versus ~387 KB for React plus JS) are real but small examples, not a full-app shootout. I would not read them as more than they are. They are intentionally poorly architected to measure throughput at massive scales. (contrived) - License is BSL 1.1, so read that before you build anything real on it.

Live demo, 10,000 products with a canvas rendering engine, plus a side by side against Svelte 5: https://buildnectar.com/app/canvas

Site: https://buildnectar.com Code: https://github.com/HibiscusConsulting/nectar-lang

I would genuinely like it torn apart. If the core bet is wrong, crush my dreams but tell me how we can make it better, please. I still am not completely sure this is even a good idea. I honestly thought this would be a lot easier to build than it has been. If I had known at the start, I would have never built it, but here we are.

Comments

debdattabasu•5d ago
This is genuinely very useful. In rust all you have is egui which is amazing but no proper ergonomic setup. Floem is a serious contender here but you went with a different approach. Watching this closely because I have some requirement where I need same codebase to work in desktop without electron and on wasm single binary single canvas.

How is your system different from floem? Are you doing pure immediate mode or retained mode partially? What are you using for 2d? Is this portable between webgl and webgpu? Do you need help? I am happy to drive this along if this is useful.

cyberclimb•5d ago
Nice! Heads up that unfortunately the demos don't appear to scroll on mobile
barefootford•1h ago
Demos dead on iOS on iPhone 16 pro.
LoganDark•58m ago
Safari on my Mac can't run it either, but Chrome can.

In Safari, the page seems to render once, and if I resize the window, it just stretches the canvas? The thing seems to die after rendering one frame.

Tistron•58m ago
Demo does not work in Fx on android
cush•52m ago
Wow that demo is slow on iOS
josephg•48m ago
How is this different / better than Leptos or Dioxus?

https://leptos.dev/

https://dioxuslabs.com/

tekacs•16m ago
I have the same question, but it doesn't look like this is actually Rust code; it's just a compiler for their custom... syntax (?) written in Rust.

https://buildnectar.com/docs/language-reference

This random custom language, I guess.

Tiny Emulators

https://floooh.github.io/tiny8bit-preview/index.html
26•naves•30m ago•0 comments

Claude Code sends 33k tokens before reading the prompt; OpenCode sends 7k

https://systima.ai/blog/claude-code-vs-opencode-token-overhead
257•systima•2h ago•134 comments

Old and new apps, via modern coding agents

https://terrytao.wordpress.com/2026/07/11/old-and-new-apps-via-modern-coding-agents/
372•subset•9h ago•104 comments

I love LLMs, I hate hype

https://geohot.github.io//blog/jekyll/update/2026/07/12/i-love-llms.html
178•therepanic•2h ago•90 comments

I Learned to Read Again

https://substack.magazinenongrata.com/p/how-i-learned-to-read-again
34•georgex7•2h ago•4 comments

The One-Step Trap (In AI Research)

http://incompleteideas.net/IncIdeas/OneStepTrap.html
21•jxmorris12•2h ago•3 comments

Against Usefulness

https://www.motivenotes.ai/p/against-usefulness
52•supo•3h ago•11 comments

LARP – Revenue infrastructure for serious founders

https://www.larp.website/
76•BerislavLopac•3h ago•14 comments

Automation Without Understanding

https://arxiv.org/abs/2607.06377
65•root-parent•3h ago•33 comments

Why write code in 2026

https://softwaredoug.com/blog/2026/07/09/write-code
51•softwaredoug•2d ago•99 comments

Migrating a production AI agent to GPT-5.6: 2.2x faster, 27% cheaper

https://ploy.ai/blog/migrating-a-production-ai-agent-to-gpt-5-6
38•brryant•3h ago•7 comments

Don't you mean extinct?

https://fabiensanglard.net/extinct/index.html
151•zdw•5h ago•79 comments

Defining new Jax types with hijax

https://docs.jax.dev/en/latest/hijax_types.html
6•fhchl•59m ago•0 comments

Show HN: Nectar, a Rust-like React that compiles to WebAssembly

https://buildnectar.com
20•blakeburnette•6d ago•8 comments

Neocities: Create your own free website

https://neocities.org/
42•Tomte•1h ago•6 comments

Irish datacenters now guzzle 23% of the country's electricity

https://www.theregister.com/on-prem/2026/07/11/irish-datacenters-now-guzzle-23-of-the-countrys-el...
25•Bender•37m ago•15 comments

The shingles vaccine may reduce the risk of dementia

https://www.economist.com/leaders/2026/07/09/a-no-brainer-for-protecting-your-brain
167•saikatsg•5h ago•123 comments

How to read more books

https://scotto.me/blog/2026-07-12-how-to-read-more-books/
202•silcoon•5h ago•117 comments

Why study Diophantine equations?

https://hidden-phenomena.com/articles/modular
52•mb1699•5h ago•17 comments

Deir El-Medina Strikes

https://en.wikipedia.org/wiki/Deir_el-Medina_strikes
30•mooreds•5d ago•4 comments

Theo de Raadt: "You've been smoking something mind altering" (2007)

https://marc.info/?l=openbsd-misc&m=119318909016582
65•turrini•4h ago•58 comments

The power of collaboration: How we can reduce traffic congestion

https://research.google/blog/the-power-of-collaboration-how-we-can-reduce-traffic-congestion/
41•raahelb•5h ago•31 comments

The Seed Beneath the Snow

https://eli.li/the-seed-beneath-the-snow
4•surprisetalk•3d ago•0 comments

Understanding the Odin programming language

https://odinbook.com/
131•AlexeyBrin•8h ago•71 comments

Show HN: Shirei, cross-platform GUI framework in native Go

https://github.com/hasenj/go-shirei/
66•hsn915•3h ago•35 comments

Ghostel.el: Terminal emulator powered by libghostty

https://dakra.github.io/ghostel/
244•signa11•12h ago•42 comments

"Stop Cutting Down Flock Cameras " (Mass Surveillance Is Good) [video]

https://www.youtube.com/watch?v=su-Ce4PlNz0
8•Bender•14m ago•0 comments

Can We Understand How Large Language Models Reason?

https://cacm.acm.org/news/can-we-understand-how-large-language-models-reason/
47•adunk•2h ago•46 comments

Vint Cerf, “father of the Internet”, is retiring

https://techcrunch.com/2026/06/30/the-father-of-the-internet-is-finally-retiring/
262•compiler-guy•2d ago•150 comments

What xAI's Grok build CLI sends to xAI: A wire-level analysis

https://gist.github.com/cereblab/dc9a40bc26120f4540e4e09b75ffb547
374•jhoho•19h ago•149 comments