Sycamore is a reactive library for creating web apps in Rust and WebAssembly.
#[component]
fn Hello() -> View {
view! {
p { "Hello World!" }
}
}
- Lightning Speed: Sycamore harnesses the full power of Rust via WebAssembly, giving you full control over performance.
- Ergonomic and Intuitive: Write code that feels natural. Everything is built on reactive primitives without a cumbersome virtual DOM.
- No JavaScript: Had enough of JavaScript? So have we. Create apps using Sycamore without touching a single line of JS.
Sycamore is extensively documented:
- Getting Started: How to write your first Sycamore app.
- Reactivity: Find out how to use Sycamore's powerful reactive primitives.
- API Documentation: rustdocs for the
sycamore
crate.
Still have questions? Don't hesitate to stop by our friendly Discord server.
Sycamore has many examples for your reference in the
examples/
directory. Be sure to
check them out!
All the examples are hosted under sycamore-rs.netlify.app/examples/<example_name>
with
<example_name>
being the name of the example you want to view. For instance, the todomvc
example
is hosted on
sycamore-rs.netlify.app/examples/todomvc
.
All the examples can also be built locally using Trunk. For instance, the
following command builds and serves the todomvc
example:
cd examples/todomvc
trunk serve
Now open up localhost:8080
in your browser to see "Hello World!".
Perseus is a fullstack framework built with Sycamore. Think NextJS or SvelteKit but with no JavaScript. Everything from backend to frontend is built with pure Rust!
Don't think Sycamore is for you? Thankfully, there are plenty of alternatives!
- SolidJS: A declarative, efficient and flexible JavaScript
library for building user interfaces
Solid is a JavaScript library which greatly inspired Sycamore. Many concepts such as fine-grained reactivity and components as factory functions were borrowed from Solid. If you don't mind working with JavaScript (or TypeScript), go check it out! - Leptos: Build fast web applications with Rust.
Leptos is another Rust library based on the fine-grained reactivity paradigm. Leptos shares many similarities with Sycamore and, as of now, has a larger community. - Dioxus: Fullstack app framework for web, desktop, mobile,
and more.
Dioxus uses a VDOM instead of fine-grained reactivity for updating the DOM, although it uses fine-grained reactivity for state management. This allows Dioxus to target a wide variety of platforms including native and mobile.
- Report issues on our issue tracker.
- We love Pull Requests! For more information, check out the section on contributing in the docs.
Sycamore would not have been possible without the wonderful contributions from the community. Thank you!
Special thanks to @nate-sys for designing the Sycamore logo!