slint/docs
Olivier Goffart f5d003d1e2 Fix conversion to from float to int
Round the value.

The previous behavior is that

 - For the interpreter, we were rounding (same as new behavior)
 - for Rust and C++ we were truncating, unless the properties were
   inlinined and then we were keeping it as float
2024-07-23 17:32:57 +02:00
..
_templates Updates 2024-07-10 13:52:11 +02:00
reference Fix conversion to from float to int 2024-07-23 17:32:57 +02:00
resources Revert "Prepare for 1.7.0 release" 2024-07-18 13:28:24 +02:00
site Update from slint-ui/website 2024-07-03 10:05:16 +00:00
building.md Consolidate language tutorials (#5037) 2024-06-04 16:54:36 +02:00
development.md Document the preferred linear history approach a little (#4034) 2023-11-30 11:01:53 +01:00
install_qt.md reuse: remove glob for markdown files 2023-08-17 08:55:28 +02:00
README.md Consolidate language tutorials (#5037) 2024-06-04 16:54:36 +02:00
testing.md It seems that syntax_tests.rs was moved to ./internal/compiler/tests/ 2024-03-18 14:58:41 +01:00
torizon.md doc: add missing closing single quotes 2024-06-12 09:29:33 +02:00
triage.md janitor: Go over our spell checking setup 2023-10-16 09:01:51 +02: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.