example: add user interaction sample(animation speed).
[platform/core/uifw/rive-tizen.git] / submodule / README.md
1 # rive-cpp
2 C++ runtime for [Rive](https://rive.app). Provides these runtime features:
3 - Loading Artboards and their contents from **.riv** files.
4 - Querying LinearAnimations and StateMachines from Artboards.
5 - Making changes to Artboard hierarchy (fundamentally same guts used by LinearAnimations and StateMachines) and effienclty solving those changes via Artboard::advance.
6 - Abstract Renderer for submitting high level vector path commands with retained path objects to optimize and minimize path re-computation (ultimately up to the concrete rendering implementation).
7 - Example concrete renderer written in C++ with [Skia](https://skia.org/). Skia renderer code is in [skia/renderer/src/skia_renderer.cpp](skia/renderer/src/skia_renderer.cpp).
8
9 ## Build System
10 We use [premake5](https://premake.github.io/). The Rive dev team primarily works on MacOS. There is some work done by the community to also support Windows and Linux. PRs welcomed for specific platforms you with to support! We encourage you to use premake as it's highly extensible and configurable for a variety of platforms.
11
12 ## Build
13 In the ```rive``` directory, run ```build.sh``` to debug build and ```build.sh release``` for a release build.
14
15 ## Testing
16 Uses the [Catch2](https://github.com/catchorg/Catch2) testing framework.
17
18 ```
19 cd dev
20 ./test.sh
21 ```
22
23 In the ```dev``` directory, run ```test.sh``` to compile and execute the tests.
24
25 The tests live in ```rive/test```. To add new tests, create a new ```xxx_test.cpp``` file here. The test harness will automatically pick up the new file.
26
27 There's a VSCode command provided to ```run tests``` from the Tasks: Run Task command palette. 
28
29 ## Memory Checks
30 Note that if you're on MacOS you'll want to install valgrind, which is somewhat complicated these days. This is the easiest solution (please PR a better one when it becomes available).
31 ```
32 brew tap LouisBrunner/valgrind
33 brew install --HEAD LouisBrunner/valgrind/valgrind
34 ```
35 You can now run the all the tests through valgrind by running ```test.sh memory```.
36
37 ## Disassembly Explorer
38 If you want to examine the generated assembly code per cpp file, install [Disassembly Explorer](https://marketplace.visualstudio.com/items?itemName=dseight.disasexpl) in VSCode.
39
40 A ```disassemble``` task is provided to compile and preview the generated assembly. You can reach it via the Tasks: Run Task command palette or you can bind it to a shortcut by editing your VSCode keybindings.json:
41 ```
42 [
43     {
44         "key": "cmd+d",
45         "command": "workbench.action.tasks.runTask",
46         "args": "disassemble"
47     }
48 ]
49 ```