{"id":29538789,"url":"https://github.com/nicojane/wsl-development-stack-glfw-skia-cpp-template","last_synced_at":"2026-04-12T09:03:23.067Z","repository":{"id":304171904,"uuid":"1017352520","full_name":"NicoJanE/WSL-Development-Stack-GLFW-Skia-CPP-Template","owner":"NicoJanE","description":"C++, template, GLFW, SKIA, WSL, Linux, Windows","archived":false,"fork":false,"pushed_at":"2025-07-11T13:44:49.000Z","size":50,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-11T15:04:21.588Z","etag":null,"topics":["cmake","cpp","cross-platform","debian","glfw","gui","linux","skia","windows","wsl2"],"latest_commit_sha":null,"homepage":"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/","language":"CMake","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/NicoJanE.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,"zenodo":null}},"created_at":"2025-07-10T12:03:24.000Z","updated_at":"2025-07-11T13:44:52.000Z","dependencies_parsed_at":"2025-07-11T15:04:30.228Z","dependency_job_id":"46139042-3eab-4b29-ade5-37f807ec66e2","html_url":"https://github.com/NicoJanE/WSL-Development-Stack-GLFW-Skia-CPP-Template","commit_stats":null,"previous_names":["nicojane/wsl-development-stack-glfw-skia-cpp-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NicoJanE/WSL-Development-Stack-GLFW-Skia-CPP-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoJanE%2FWSL-Development-Stack-GLFW-Skia-CPP-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoJanE%2FWSL-Development-Stack-GLFW-Skia-CPP-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoJanE%2FWSL-Development-Stack-GLFW-Skia-CPP-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoJanE%2FWSL-Development-Stack-GLFW-Skia-CPP-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicoJanE","download_url":"https://codeload.github.com/NicoJanE/WSL-Development-Stack-GLFW-Skia-CPP-Template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoJanE%2FWSL-Development-Stack-GLFW-Skia-CPP-Template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265567476,"owners_count":23789489,"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","cross-platform","debian","glfw","gui","linux","skia","windows","wsl2"],"created_at":"2025-07-17T05:15:41.464Z","updated_at":"2026-04-12T09:03:23.060Z","avatar_url":"https://github.com/NicoJanE.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdetails\u003e\n\u003csummary\u003e📑 Table of Contents\u003c/summary\u003e\n\n- [Introduction](#introduction)\n- [Quick Setup](#qsetup)\n- [Libraries GLFW \u0026 Skia](#lib)\n- [The Template Project Architecture](#temp)\n- [More Instructions](#more)\n\n\u003c/details\u003e\n\n# GLFW-Skia C++ Template \u003cspan style=\"color: #409EFF; font-size: 0.6em; font-style: italic;\"\u003e -  Docker Container\u003c/span\u003e\n\n![MIT License](https://img.shields.io/badge/License-MIT-green) ![Commercial Services Available](https://img.shields.io/badge/Services-Optional-blue)\n![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-brightgreen)\n![C++](https://img.shields.io/badge/C++-17-blue.svg)\n\n\u003ca id=\"introduction\"\u003e\u003c/a\u003e\n\n## ℹ️ Introduction\n\nThis is a template C++ project using the **GLFW** and **Skia** libraries (built from source) to create a cross-platform graphical user interface (GUI) for **Windows** and **Linux**.  It uses **CMake** as the build system and includes a Skia-based sample application to demonstrate integration.\n\nThe project is preconfigured with:\n\n- **Visual Studio Code** launch and task files for streamlined development.\n- A `CMakePresets.json` file for easy integration with **Visual Studio 2022/2026** on Windows.\n- Build instruction for building the GLFW and Skia libraries from source.\n- A sample (template) project with source using GLFW and Skia\n\n---\n\n\u003ca id=\"qsetup\"\u003e\u003c/a\u003e\n\n## ⚙️🏃‍♂️ Library Setup Instructions\n\n⏱️ **Note:** Building GLFW and Skia from source is a comprehensive process that can take significant time (especially Skia). Follow the detailed setup guides below. To access the installation instructions, use one of the links below. For more details, read the rest of this document.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\u003cstrong\u003e\u003cem\u003ePlatform\u003c/em\u003e\u003c/strong\u003e\u003c/th\u003e\n\u003cth align=\"left\"\u003e\u003cstrong\u003e\u003cem\u003ePurpose\u003c/em\u003e\u003c/strong\u003e\u003c/th\u003e\n\u003cth align=\"left\"\u003e\u003cstrong\u003e\u003cem\u003eSetup Guide\u003c/em\u003e\u003c/strong\u003e\u003c/th\u003e\n\u003cth align=\"left\"\u003eAgent Mode\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🪟 \u003cstrong\u003eWindows\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003eNative development, VS Code, debugging\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/Howtos/setup_win\"\u003eWindows Setup\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e💫 \u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/Howtos/VSC-AgentMode_win\"\u003eVSC Agent Mode Windows\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e🐧 \u003cstrong\u003eWSL Linux\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003eCross-platform builds, Linux testing\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/Howtos/setup_linux\"\u003eLinux Setup\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e💫 \u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/Howtos/VSC-AgentMode_lin\"\u003eVSC Agent Mode Linux\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e✨ \u003cstrong\u003eGeneral\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e General Information\u003c/td\u003e\n\u003ctd colspan=\"2\"\u003e \u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/index\"\u003eGeneral Page Index\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd colspan=\"4\" style=\"font-size: 0.85em; text-align: left;\"\u003e\u003cem\u003e\u003csup\u003e*\u003c/sup\u003eBoth setups work together — you'll develop on Windows but can build/test on Linux seamlessly.\u003c/em\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003cbr\u003e  \n\n## ⚙️🏃‍♂️ Building the sample project\n\nA sample project is included and can be used after the above libraries are set up. For build instructions, see:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth colspan=\"2\" align=\"left\"\u003e📚 \u003cstrong\u003eOther Instructions\u003c/strong\u003e (next step)\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\u003cstrong\u003e\u003cem\u003eDocument type\u003c/em\u003e\u003c/strong\u003e\u003c/th\u003e\n\u003cth align=\"left\"\u003e\u003cstrong\u003e\u003cem\u003eLocation\u003c/em\u003e\u003c/strong\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eProject Build Instruction\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003e\u003ca href=\"https://nicojane.github.io/WSL-Development-Stack-GLFW-Skia-CPP-Template/Howtos/building_project\"\u003eHere\u003c/a\u003e\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n\u003ca id=\"lib\"\u003e\u003c/a\u003e\n\n## 📦 More about GLFW \u0026 Skia\n\nThis project uses two complementary, cross-platform libraries: GLFW for creating windows, managing graphics contexts, and handling user input, and Skia for high-performance, hardware-accelerated 2D drawing. GLFW focuses on windowing and input management without providing graphics rendering itself, which is why Skia is used to handle all rendering of text, images, and shapes with GPU acceleration. Together, they provide a robust foundation for building responsive and visually rich applications across Windows, Linux, and macOS.\n\n### GLFW, Windowing \u0026 Input\n\n[GLFW](https://www.glfw.org/) is a lightweight, cross-platform library. It’s commonly used for building real-time applications like games, simulations, and custom GUI frameworks. It provides:\n\n- **OpenG**L - OpenGL ES, and Vulkan context creation\n- **Window** - creation and management\n- **Input** - handling (keyboard, mouse, etc.)\n\n#### Skia, 2D Graphics Engine\n\n[Skia](https://skia.org/) is a high-performance 2D graphics library. It supports text rendering, vector shapes, images, gradients, and more, all with hardware acceleration. In this project, Skia handles all 2D drawing, while GLFW handles the window and input. Note that it is also used by: Google Chrome, Flutter, Mozilla Firefox (Canvas API)\n\n- **Backend flexibility** – Unified API for CPU/GPU via OpenGL, Vulkan, Metal, or software.\n- **Precision rendering** – Anti-aliased text, vector shapes, and subpixel accuracy.\n- **Versatile output** – Renders to OpenGL surfaces, images, PDFs, or SVG.\n\n\u003cdetails\u003e\n\u003csummary\u003e 🧰 Skia Build Requirements:  \n\u003c/summary\u003e\u003cbr\u003e\n\n\u003e ### **Skia** library build requires  \n\u003e\n\u003e\u0026nbsp;\u0026nbsp; 📚  Python 3  \n\u003e\u0026nbsp;\u0026nbsp; 📚  Git  \n\u003e\u0026nbsp;\u0026nbsp; 📚  Depot Tools  \n\u003e\u0026nbsp;\u0026nbsp; 📚  Ninja build system  \n\u003e\n\u003eThese dependencies must be installed and configured following the detailed setup procedures linked above. The Skia build process is comprehensive and involves cloning the repository, syncing dependencies, and building with specific configurations.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e⚠️ OpenGL vs Vulkan Compatibility Notes\n\u003c/summary\u003e\u003cbr\u003e\n\n\u003e ### OpenGL or Vulkan\n\u003e\n\u003eBoth GLFW and Skia support OpenGL or Vulkan, but they must be configured to use the same graphics API.\n\u003e\n\u003eFor OpenGL, Skia uses classes like GrGLInterface, GrBackendRenderTarget, and GrDirectContext.  \n\u003eFor Vulkan, Skia uses GrVkBackendContext and Vulkan-specific setup.  \n\u003eSkia’s API is mostly consistent across backends, so much of your drawing code stays the same, only the backend setup differs.\n\u003e\n\u003e **Choice**\n\u003eThe sample in this project assumes you use OpenGL because it's simpler, mature, cross-platform, and well-supported by Skia and GLFW.\n\u003e\n\u003e**Converting**\n\u003eConverting from OpenGL to Vulkan in this project is doable with some effort; it mainly involves changing the graphics backend initialization and context management (GLFW). Skia's drawing code remains unchanged.\n\u003e\n\u003eSupporting macOS is more challenging because Apple chose to not support Vulkan and instead reinvent the wheel with their own Metal API, making things harder for cross-platform developers.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e⚠️ Common Setup Pitfalls\n\u003c/summary\u003e\u003cbr\u003e\n\n\u003e ### **Windows-specific issues to avoid:**\n\u003e\n\u003e 🚫 **Path length limits** – Skia builds can fail with \"file name too long\" errors. Use short paths like `C:\\libs\\skia`  \n\u003e 🚫 **ninja.exe vs ninja.bat** – Ensure the official `ninja.exe` is first in your PATH, not `depot_tools\\ninja.bat`  \n\u003e 🚫 **Old environment variables** – Previous Skia builds can leave conflicting EMSDK variables  \n\u003e ⏱️ **Build time** – Skia builds can take significant time; plan accordingly  \n\u003e 🚫 **Spaces in paths** – Avoid spaces or special characters in project paths  \n\u003e\n\u003e See the detailed setup guides for complete troubleshooting information.\n\n\u003c/details\u003e\n\n---\n\n\u003ca id=\"temp\"\u003e\u003c/a\u003e\n\n## ⚡The Template Project Architecture\n\nThis template consists of a template project for building a **GUI control** sample application based on the **GLFW** library and the **Skia** library. Supporting both **Windows**  and **Linux** (Debian 12) operating systems. For Windows, the **MSBuild** toolchain of Visual Studio 2022/2026 Community Edition is used, and for Debian the **GNU Compiler Collection** is used.\n\nThe folder structure (\u003csmall\u003e some folders and files are not include because they are Github specific files(layout ect.) :\n\n\u003cpre\u003e\u003ccode\u003e\n📁 Project  \n├──📂.vscode                    ➜ \u003ci\u003eVSC Tasks \u0026 Launchers \u003c/i\u003e\n├──📂_README                    ➜ \u003ci\u003eDocumentation \u003c/i\u003e\n│   └──🧾 README.md             ➜ \u003ci\u003eThe readme instruction file (\u003cb\u003ethis file\u003c/b\u003e)\u003c/i\u003e\n├──📂cmake                      ➜ \u003ci\u003eSpecialized, customizable, CMake files for Windows and Linux \u003c/i\u003e\n│   ├──📦CMakeLists_Init-env.bat➜ \u003ci\u003ePath to env variables for MS VC compiler(\u003cb\u003evcvars64.bat\u003c/b\u003e)\u003c/i\u003e\n│   ├──📦CMakeLists_start.sh.in ➜ \u003ci\u003eCreates startup app logic in Linux builds  \u003c/i\u003e\n│   ├──📦linux.cmake            ➜ \u003ci\u003eThe file to \u003cb\u003ecustomize for Linux\u003c/b\u003e builds  \u003c/i\u003e\n│   ├──📦linux_utilities.cmake  ➜ \u003ci\u003eLinux utilities to display hard/software info.  \u003c/i\u003e\n│   └──📦windows.cmake          ➜ \u003ci\u003eThe file to \u003cb\u003ecustomize for Windows\u003c/b\u003e builds  \u003c/i\u003e\n├──📂dependencies/win           ➜ \u003ci\u003eDependent libraries needed for the source like \u003cb\u003eGLFW\u003c/b\u003e \u0026 \u003cb\u003eSkia\u003c/b\u003e\u003c/i\u003e\n│   ├──📂win                    ➜ \u003ci\u003eWindows location for specialized libs \u003c/i\u003e\n│   │   └──📂Your Lib           ➜ \u003ci\u003eAdd libraries you need here \u003c/i\u003e\n│   └──📂linux                  ➜ \u003ci\u003eLinux location for specialized libs \u003c/i\u003e\n│       └──📂Your Lib           ➜ \u003ci\u003eAdd libraries you need here \u003c/i\u003e\n├──📂src                        ➜ \u003ci\u003eGLFW and Skia sample source\u003c/i\u003e\n├──⚡build.ps1                  ➜ \u003ci\u003eWindows script to invoke the build\u003c/i\u003e\n├──⚡build.sh                   ➜ \u003ci\u003eLinux script to invoke the build\u003c/i\u003e\n├──📦CMakeLists.txt             ➜ \u003ci\u003eMain CMake file\u003c/i\u003e\n├──📦CMakePresets.json          ➜ \u003ci\u003eUsed to load the project in Visual Studio 2022\u003c/i\u003e\n\n\u003c/code\u003e\u003c/pre\u003e\n\n---\n\n\u003ca id=\"more\"\u003e\u003c/a\u003e\n\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nicojane.github.io/WSL-Template-Stacks-Home/\"\u003e\n    \u003cimg src=\"assets/images/WSLfooter.svg\" alt=\"WSL Template Stacks\" width=\"400\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\u003csmall\u003e \u003ci\u003e\u003cb\u003eLicense\u003c/b\u003e\u003cbr\u003eThis file is part of: \u003cb\u003eGLFW-Skia C++ Template Stack\u003c/b\u003e  Copyright (c) 2025-2026 Nico Jan Eelhart. This repository is \u003ca href=\"MIT-license.md\"\u003eMIT licensed\u003c/a\u003eand free to use. For optional commercial support, customization, training, or long-term maintenance, see \u003ca href=\"COMMERCIAL.md\"\u003eCOMMERCIAL.md\u003c/a\u003e\u003c/i\u003e\n\u003c/small\u003e\n\n\u003cp align=\"center\"\u003e─── ✦ ───\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicojane%2Fwsl-development-stack-glfw-skia-cpp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicojane%2Fwsl-development-stack-glfw-skia-cpp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicojane%2Fwsl-development-stack-glfw-skia-cpp-template/lists"}