Live data from Hacker News

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

buildnectar.com

11–19 of 19 posts

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

#12
The Svelte demo (which does work on mobile, unlike the nectar version) seems a bit misleading. You won’t be rendering and filtering 10000 items on the screen, and if you do for some kind of UI, there are more performant ways to do it. A less biased benchmark would make a better case.

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

#14
post #8

How is this different / better than Leptos or Dioxus? https://leptos.dev/ https://dioxuslabs.com/

Largely the difference, as I am aware of those two options. They build on the traditional DOM. I took this approach, and as I was attempting to speed processes up I was consistently running into issues where I was beholden to C++ and Blink. The more I tried to beat Svelte, it seemed that I was hitting limitations with traditional web architectures, javascript and the DOM itself. They are fantastic options. I support writing Rust everywhere. But I was kind of over the many issues with JS (security, performance limitations, etc...). I had a vague curiosity about the ability to abandon the traditional DOM, thoughts on WASM and long story short I went for it. So what you are seeing is not a traditional DOM, inspect the demo page and compare it to the Svelte demo. I built my own DOM, but when you compile Nectar it automatically gets picked up as a traditional DOM by screen readers and SEO (this still needs some love). Initial loads, I am still really struggling with, but sorts and filters are quite performant.

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

#15

The Svelte demo (which does work on mobile, unlike the nectar version) seems a bit misleading. You won’t be rendering and filtering 10000 items on the screen, and if you do for some kind of UI, there are more performant ways to do it. A less biased benchmark would make a better case.

I totally get the benchmark is arbitrary for most usecases. I have gone back and forth on how to benchmark this, what's repeatable, what's fair, etc... What you see is largely me building something that lets me test performance, and rendering 10k rows with no virtualization is deliberately the dumbest possible case, it's a stress test, not a recommendation.

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

#16

Nice! Heads up that unfortunately the demos don't appear to scroll on mobile

Mobile and scroll. Yeah. I have been struggling with these.

I need to add some love into those two areas for sure. As well as Safari and edge cases, etc. If anyone wants to contribute...

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

#17
I appreciate all of your feedback so far. It is incredibly helpful. Everyone in this room is so much smarter than I am so thank you for helping point me in the right direction. And of course if anyone wants to contribute, I would love nothing more than that.

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

#18

What is the binary size comparison including wasm + js?

Since this is still in development, it fluctuates slightly, but the floor is effectively

WASM - 374KB Raw || 148KB gzipped

JS and HTML - 31KB Raw || 8KB gzipped

Total - 404KB Raw || TLDR; 156KB for the end user

Post reply on HN