Skip to content

Commit

Permalink
Rust quickstart: don't use the template if we're not using build.rs
Browse files Browse the repository at this point in the history
The quickstart use the slint macro which doesn't use build.rs. The template is conter-productive
as it uses the slint-build and build.rs to compile Slint file.
If we're not using that, it is much easier to start with a fresh clean project.
  • Loading branch information
ogoffart committed Jun 19, 2024
1 parent dde5447 commit 3bbb6e9
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions docs/reference/src/quickstart/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,12 @@ Run the example with `npm start` and a window appears with the green "Hello Worl

We recommend using [rust-analyzer](https://rust-analyzer.github.io) and [our editor integrations for Slint](https://github.com/slint-ui/slint/tree/master/editors) for following this tutorial.

Slint has an application template you can use to create a project with dependencies already set up that follows recommended best practices.

Before using the template, install [`cargo-generate`](https://github.com/cargo-generate/cargo-generate):

```sh
cargo install cargo-generate
```

Use the template to create a new project with the following command:
Let's create a new Rust application and add `slint` ad a dependency

```sh
cargo generate --git https://github.com/slint-ui/slint-rust-template --name memory
cargo new memory
cd memory
cargo add slint
```

### Configure the project
Expand All @@ -165,4 +158,4 @@ Run the example with `cargo run` and a window appears with the green "Hello Worl

:::::

![Screenshot of initial tutorial app showing Hello World](https://slint.dev/blog/memory-game-tutorial/getting-started.png "Hello World")
![Screenshot of initial tutorial app showing Hello World](https://slint.dev/blog/memory-game-tutorial/getting-started.png "Hello World")

0 comments on commit 3bbb6e9

Please sign in to comment.