{"id":26856703,"url":"https://github.com/artus9033/skia-arithmetic-calculator","last_synced_at":"2026-04-28T20:04:17.729Z","repository":{"id":284971483,"uuid":"937574798","full_name":"artus9033/Skia-Arithmetic-Calculator","owner":"artus9033","description":"A modern C++ application project for visual Simulink- / Unreal Engine Blueprint-like flow-based arithmetic calculations with a graphical interface built using GLFW, Skia and Boost Multiprecision.","archived":false,"fork":false,"pushed_at":"2025-03-28T16:43:54.000Z","size":256,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T17:44:37.456Z","etag":null,"topics":["cmake","cpp","glfw","qt","skia"],"latest_commit_sha":null,"homepage":"https://artus9033.github.io/Skia-Arithmetic-Calculator/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artus9033.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-23T12:00:35.000Z","updated_at":"2025-03-28T16:43:58.000Z","dependencies_parsed_at":"2025-03-28T17:54:44.678Z","dependency_job_id":null,"html_url":"https://github.com/artus9033/Skia-Arithmetic-Calculator","commit_stats":null,"previous_names":["artus9033/skia-arithmetic-calculator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2FSkia-Arithmetic-Calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2FSkia-Arithmetic-Calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2FSkia-Arithmetic-Calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2FSkia-Arithmetic-Calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artus9033","download_url":"https://codeload.github.com/artus9033/Skia-Arithmetic-Calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246397405,"owners_count":20770549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","glfw","qt","skia"],"created_at":"2025-03-31T00:23:12.974Z","updated_at":"2026-04-28T20:04:17.636Z","avatar_url":"https://github.com/artus9033.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flow Arithmetic Calculator\n\nA modern C++ application project for visual Simulink- / Unreal Engine Blueprint-like flow-based arithmetic calculations with a graphical interface built using GLFW, Skia and Boost Multiprecision.\n\nContains documentation generation with Doxygen, unit tests with Google Test and a Justfile for simplified build operations.\n\nBusiness logic is implemented as a static library, and the GUI is implemented as an executable that links against the business logic library.\n\n## Project structure\n\n```bash\n+-- build/ # Build directory\n+-- docker-dev/ # Docker development container files\n+-- docs/ # Documentation\n|   +-- Doxyfile.in # Doxygen configuration template\n|   +-- mainpage.md # Documentation main page\n+-- include/ # Public headers\n|   +-- business_logic/ # Core logic headers\n|   +-- gui_app/ # GUI application headers\n+-- src/ # Source files\n|   +-- business_logic/ # Core logic implementation\n|   +-- gui_app/ # GUI application implementation\n+-- tests/ # Test files\n+-- third_party/ # External dependencies\n+-- CMakeLists.txt # Root CMake configuration\n+-- config-windows.cmake # Windows-specific configuration\n+-- Justfile # Justfile for simplified build operations\n+-- README.md # This file\n+-- cspell.json # CSpell configuration\n+-- docker-compose.yml # Docker compose configuration\n+-- .clang-format # Clang format configuration\n+-- .clang-tidy # Clang tidy configuration\n+-- .gitignore # Git ignore file\n```\n\n## Prerequisites\n\nDevelopment environment - general requirements:\n\n- CMake 3.20 or higher\n- Git\n- Python 3.x (required by Skia build scripts)\n- Doxygen installed\n- Qt6 development packages\n- `clang` and `clang++` installed (**especially Windows**: `winget install -e --id LLVM.LLVM`)\n- `lldb` (if debugging)\n\nDevelopment environment - platform-specific requirements:\n\n- harfbuzz installed (MacOS only)\n- X11, XCB \u0026 XKB development libraries installed (Linux only)\n- fontconfig installed (Linux only) - required for font loading\n- (**Windows only**) configured the path to Qt installation's `cmake` directory in [`config-windows.cmake`](/config-windows.cmake) that can be copied over from [`config-windows.cmake.example`](/config-windows.cmake.example)\n- Qt6 (MacOS \u0026 Linux only, **needed both for runtime and build time**)\n\nRuntime environment requirements:\n\n- X11 \u0026 XCB installed (Linux only) or Wayland with `qt6-wayland` (Linux only)\n- Qt6 (MacOS \u0026 Linux only)\n- fontconfig (Linux only)\n- GLFW lib, version 3 (MacOS \u0026 Linux only, Windows build is `winqtdeploy`ed with the DLL)\n\nThe project automatically downloads and builds all other dependencies:\n\n- GLFW\n- Skia\n- Google Test\n\n## Quickstart\n\nTo quickly have it all running, execute:\n\n```bash\njust configure build-all run-tests run-gui\n```\n\n## VS Code scenarios\n\nThe project carries the following preconfigured launch scenarios:\n\n- GUI App (Debug)\n- GUI App (Release)\n- Tests (Debug)\n- Tests (Release)\n\nDebug scenarios attach a debugger - `lldb`.\n\n## Simplified scripts - Just\n\nThis project uses [Just](https://github.com/casey/just) to simplify all operations, centralizing them in a single file.\n\nThe available variables are:\n\n- `build-type` with possible values: `\"Debug\"`, `\"Release\"` that distinguishes between debug and release builds\n\nThe available commands are:\n\n- `just configure` - Configure the project\n- `just build-all` - Build everything\n- `just build-gui` - Build the GUI application\n- `just build-tests` - Build the tests\n- `just build-docs` - Build the HTML documentation ([`build/docs/html/index.html`](build/docs/html/index.html))\n- `just build-docs-pdf` - Build the PDF documentation ([`build/docs/latex/refman.pdf`](/build/docs/latex/refman.pdf))\n- `just run-gui` - Run the GUI application\n- `just run-tests` - Run the tests\n- `just clang-tidy` - Run clang-tidy\n- `just clang-format` - Run clang-format\n- `just cppcheck` - Run cppcheck\n- `just cspell` - Run CSpell\n- `dev-docker-up` - Run the development container\n- `dev-docker-down` - Stop the development container\n\nThe general syntax is `just build-type=\"{Debug,Release}\" command1 [? ...commands]`\n\n**For an initial setup**, run: `just configure build-all`.\n\n**The basic build-and-run command** you will likely be interested in is: `just build-type=Release build-gui run-gui`.\n\n## Development container\n\nFor simplicity, the repository includes a Docker development container image file in [`docker-dev/Dockerfile`](/docker-dev/Dockerfile) and a [`docker-compose.yml`](/docker-compose.yml) compose config that can be used to bootstrap the container with the current directory (root of this repository mounted) without the `build` directory. This effectively means that for that container, the `build` directory will be separately stored inside the container disk, allowing for the host to also have its own build tree.\n\nJustfile provides scripts `dev-docker-up` (start container) and `dev-docker-down` (stop container) for a quick usage of this container.\n\n## Building\n\n### Basic build\n\nCreate and enter build directory\n\n```bash\nmkdir build \u0026\u0026 cd build\n```\n\nConfigure project\n\n```bash\ncmake -DCMAKE_BUILD_TYPE=Release ..\n```\n\nBuild everything (app, tests, docs)\n\n```bash\ncmake --build . --config Release\n```\n\n### Build options\n\nThe following CMake options are available:\n\n- `BUILD_TESTS=ON/OFF` (default: ON) - Build unit tests\n- `BUILD_DOCS=ON/OFF` (default: ON) - Generate documentation\n\nExample with options:\n\n```bash\ncmake -DBUILD_TESTS=OFF -DBUILD_DOCS=ON ..\n```\n\nBuild just the GUI application\n\n```bash\ncmake --build . --target gui_app\n```\n\nBuild just tests\n\n```bash\ncmake --build . --target run_tests\n```\n\nJust generate the documentation\n\n```bash\ncmake --build . --target docs\n```\n\n## Running\n\nAfter building, the executable can be found at:\n\n- Windows: `build/src/gui_app/Release/gui_app.exe`\n- Linux/MacOS: `build/src/gui_app/gui_app`\n\n## Testing\n\nTests are implemented using Google Test framework. To run the tests:\n\n```bash\ncmake --build . --target run_tests\nctest -C Release --output-on-failure\n```\n\n## Project tooling, code style \u0026 static analysis\n\nThe project uses the following tools for code style:\n\n- `clang-format` for formatting the code (configured in [`.clang-format`](.clang-format))\n- `clang-tidy` for static analysis (configured in [`.clang-tidy`](.clang-tidy))\n- `cspell` for spell checking (configured in [`cspell.json`](cspell.json))\n\n## Documentation\n\nDocumentation is generated using Doxygen from source code comments. After building the `docs` target, open `build/docs/html/index.html` in your web browser.\n\nDoxygen-style comments are used for generating the documentation.\n\n## Project components\n\n### Business logic library\n\nThe core functionality is implemented as a static library in `src/business_logic/`. This library contains the application's main logic and is independent of the GUI implementation.\n\n### GUI application\n\nThe GUI application in `src/gui_app/` implements the user interface using GLFW and Skia. It depends on the business logic library.\n\n## CI / CD pipelines\n\nThe project contains a GitHub Actions [workflow](/.github/workflows/ci-cd.yml) that builds and tests the project on every push to the repository.\n\n### CI\n\nThe continuous integration job checks the spelling with CSpell, Runs cppcheck on the files, runs clang-format and clang-tidy. The runner used is `ubuntu-latest`.\n\n### CD\n\nThe first continuous deployment job (`Build artifacts (CD)`) builds the project and runs the tests, only if the push occurred to the `main` branch. The job is a matrix, which runs on `ubuntu-latest`, `macos-latest`, and `windows-latest` runners.\n\nBuilt application binary for each platform is uploaded as an artifact. If a push occurs with a tag, a release is created for that tag.\n\nDocumentations is also built by this job and stored as an artifact for GH Pages in the next job.\n\nThe last job (`Deploy to GitHub Pages (CD)`) deploys the documentation built in the previous job to [Github Pages](https://artus9033.github.io/Skia-Arithmetic-Calculator/).\n\n## GIT Hooks\n\nCMake will install the following git hooks if git is available \u0026 only on UNIXes (to avoid implementing return code propagation in justfile in platform-specific ways that would clutter the file):\n\n- `pre-commit` (source: `pre-commit.in`) - runs `just` commands:\n  - `check-clang-format` - linting\n  - `check-spelling` - spellcheck\n- `pre-push` (source: `pre-push.in`) - runs `just` commands:\n  - `configure build-tests run-tests` (unit tests)\n  - `cppcheck` (static code analysis)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartus9033%2Fskia-arithmetic-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartus9033%2Fskia-arithmetic-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartus9033%2Fskia-arithmetic-calculator/lists"}