Looking for Sycamore v0.9? Check out our new website!

This is outdated documentation for Sycamore.

For up-to-date documentation, see the latest version (v0.8).

Getting Started

This documentation assumes the developer is already familiar with Rust programming. To learn more about Rust, check out the Rust Book.

Install Rust

First, you’ll need to install Rust. Follow the official instructions to get started.

You will also need the wasm32-unknown-unknown target installed:

rustup target add wasm32-unknown-unknown

Install Trunk

Trunk is the recommended build tool for Sycamore. If you are from JS land, Trunk is like webpack or rollup but specifically tailored to Rust + Wasm apps.

You can use cargo to install Trunk:

cargo install trunk wasm-bindgen-cli

For more information, head over to the Trunk website

Create a new Sycamore project

Create a new Rust project using cargo:

cargo new my-project
cd my-project

You now need to add Sycamore to your new project’s dependencies. Add the following to your Cargo.toml file in your project folder:

sycamore = "0.5.2"

You should now be all set for your Sycamore adventure!