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:
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:
For more information, head over to the Trunk website
Create a new Sycamore project
Create a new Rust project using cargo
:
You now need to add Sycamore to your new project’s dependencies. Add the following to your
Cargo.toml
file in your project folder:
= "0.5.2"
You should now be all set for your Sycamore adventure!