slint/docs/tutorial
Chris Chinchilla 9345638191
Refactor CPP Quickstart to use project template project (#4722)
* Refactor CPP Quickstart to use project template project

* Update docs/tutorial/cpp/src/main_initial.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update docs/tutorial/cpp/src/game_logic_in_cpp.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/tutorial/cpp/src/creating_the_tiles_from_cpp.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/tutorial/cpp/src/from_one_to_multiple_tiles.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/tutorial/cpp/src/from_one_to_multiple_tiles.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/tutorial/cpp/src/getting_started.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Remove commented text

* Re-add removed powershell icon commands

* Undo rename

* Correct path in CMakeLists.txt

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-03-11 15:09:01 +01:00
..
cpp Refactor CPP Quickstart to use project template project (#4722) 2024-03-11 15:09:01 +01:00
node Refactor JavaScript example to use template project (#4758) 2024-03-08 13:20:37 +01:00
rust Refactor CPP Quickstart to use project template project (#4722) 2024-03-11 15:09:01 +01:00
theme Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
.gitignore Initial conversion of the memory game tutorial to mdbook 2021-06-15 14:38:40 +02:00
README.md doc: update the tutorial README to mention the node tutorial 2023-11-06 17:39:13 +01:00

Tutorials

The source code for the Rust, C++, and Node.js versions of the Memory Game tutorial are located in the respect rust, cpp, and node sub-directories. They are built using mdbook.

Requirements

Building the tutorial requires mdbook, which you can install with cargo:

cargo install mdbook

Building

To build the tutorial, enter the rust, cpp, or node sub-directory and run:

mdbook build

The output will be in the book/html subdirectory. To check it out, open it in your web browser.

Code Samples

The code in the tutorial is available in separate steps in .rs, .cpp, and .js files.

The .rs files are mapped to different binaries, so you if you change into the rust/src sub-directory, then cargo run will present you with binaries for the different steps.

The .cpp files are built using cpp/src/CMakeLists.txt, which is included from the top-level CMakeLists.txt.