HN
Today

Show HN: Sycamore – next gen Rust web UI library using fine-grained reactivity

Sycamore unveils itself as a "next-gen" Rust web UI library, championing fine-grained reactivity, type-checking, and server-side rendering for optimal performance. While the framework promises an "effortless" development experience, the Hacker News community immediately scrutinizes its differentiation amidst a burgeoning Rust UI ecosystem. The ensuing discussion delves into comparisons with Dioxus and Leptos, debating its unique approach and the broader vision for Rust in frontend development.

42
Score
30
Comments
#2
Highest Rank
5h
on Front Page
First Seen
Apr 1, 1:00 PM
Last Seen
Apr 1, 6:00 PM
Rank Over Time
2371924

The Lowdown

Sycamore is introduced as a new Rust web UI library built on Rust and WebAssembly, emphasizing "effortless performance" through its fine-grained reactivity system. The library aims to streamline web development by offering compile-time type-checking, robust server-side rendering (SSR) capabilities, and built-in features like asynchronous data handling and routing. The announcement highlights the release of v0.9.0, which includes reactivity v3, View v2, a resources API, suspense, and SSR streaming.

Key features of Sycamore include:

  • Performance: Leverages Rust and WebAssembly for full control over application performance.
  • Fine-Grained Reactivity: Ensures only necessary parts of the UI update, optimizing resource use.
  • Type-Checked UI: Catches errors early at compile-time using its custom DSL or builder API.
  • Server-Side Rendering (SSR): Supports SSR out-of-the-box, alongside traditional Single Page Application (SPA) mode.
  • Async and Suspense: Provides APIs for easily managing and displaying asynchronous data.
  • Built-in Routing: Offers integrated routing for both client-side and server-side navigation.

Sycamore positions itself as a modern solution for building performant and reliable web interfaces with Rust, aiming to simplify complex UI development through its opinionated yet powerful approach.

The Gossip

Demonstrative Deficiencies

A primary concern among commenters was the Sycamore landing page's lack of immediate visual examples or clear descriptions of its web UI capabilities. Many users expressed confusion, initially assuming it might target desktop or mobile due to the absence of screenshots and explicit statements, despite the website itself being built with Sycamore. The author acknowledged this feedback, indicating plans for improvement.

Reactivity Rivalries

The discussion quickly pivoted to comparing Sycamore with other Rust UI frameworks like Dioxus and Leptos, with users questioning its unique advantages. The author clarified Sycamore's fine-grained reactivity model, contrasting it with React's lifecycle and Dioxus's Virtual DOM approach, emphasizing Sycamore's single-run component functions and reactive graph. This sparked debate over VDOM vs. signal-based reactivity and the broader effectiveness of Rust for front-end development compared to established JavaScript options.

Forward Focus & Future Features

Commenters inquired about the project's development velocity, noting that other Rust UI frameworks appeared more active since Sycamore's v0.9.0 release. The author responded, confirming ongoing minor releases and plans for a new major update, alongside a call for new contributors. Interestingly, the author also revealed ambitions for Sycamore to expand into native GUI support, exploring integration with toolkits like GTK, Iced, and GPUI, though stressing a "separate codebase" philosophy for web and native UIs.