Getting Started

We assume that you are a somewhat familiar with Rust, and that you know how to create a Rust application with cargo new. The Rust Getting Started Guide can help you get set up.

First, we create a new cargo project:

cargo new memory
cd memory

Then we edit Cargo.toml to add the sixtyfps dependency:

edition = "2018"
resolver = "2"

sixtyfps = "0.1.5"

The resolver = "2" line is there to avoid some errors because of conflicting dependencies on some platforms.

Finally we copy the hello world program from the SixtyFPS documentation into our src/

fn main() {
sixtyfps::sixtyfps! {
    MainWindow := Window {
        Text {
            text: "hello world";
            color: green;

We run this example with cargo run and a window will appear with the green "Hello World" greeting.

Screenshot of initial tutorial app showing Hello World