Repository: eliemichel/LearnWebGPU-Code
Branch: main
Commit: 19115f81274c
Files: 4
Total size: 5.0 KB
Directory structure:
gitextract_6rd4e48e/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── cmake.yml
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: eliemichel
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=DNEEF8GDX2EV6¤cy_code=EUR&source=url']
================================================
FILE: .github/workflows/cmake.yml
================================================
name: CMake
# Controls when the workflow will run
on:
push:
pull_request:
workflow_dispatch:
env:
BUILD_TYPE: Release
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
install-deps: |
sudo apt-get update -y
sudo apt-get install -y xorg-dev
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Cancel if no CMakeLists is found
- name: Look for CMakeLists file
id: check-cmakelists
run: |
if test -f CMakeLists.txt; then
echo "cmakelists-exists=true" >> "$GITHUB_OUTPUT"
fi
shell: bash
- name: Install dependencies
if: ${{ matrix.install-deps && steps.check-cmakelists.outputs.cmakelists-exists }}
run: ${{ matrix.install-deps }}
- name: Configure CMake
if: ${{ steps.check-cmakelists.outputs.cmakelists-exists }}
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
if: ${{ steps.check-cmakelists.outputs.cmakelists-exists }}
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2022 Elie Michel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/eliemichel/LearnWebGPU/main/images/webgpu-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/eliemichel/LearnWebGPU/main/images/webgpu-light.svg">
<img alt="Learn WebGPU Logo" src="images/webgpu-dark.svg" width="200">
</picture>
<a href="https://github.com/eliemichel/LearnWebGPU">LearnWebGPU</a> | <a href="https://github.com/eliemichel/WebGPU-Cpp">WebGPU-C++</a> | <a href="https://github.com/eliemichel/WebGPU-distribution">WebGPU-distribution</a><br/>
<a href="https://github.com/eliemichel/glfw3webgpu">glfw3webgpu</a> | <a href="https://github.com/eliemichel/sdl2webgpu">sdl2webgpu</a> | <a href="https://github.com/eliemichel/sdl3webgpu">sdl3webgpu</a>
<a href="https://discord.gg/2Tar4Kt564"><img src="https://img.shields.io/static/v1?label=Discord&message=Join%20us!&color=blue&logo=discord&logoColor=white" alt="Discord | Join us!"/></a>
</div>
LearnWebGPU - Code
==================
This repository contains the reference code base accompanying the [Learn WebGPU](https://eliemichel.github.io/LearnWebGPU) web book.
Each step of the book is stored in a different branch. You can look at them incrementally, or compare them using GitHub's branch comparator.
**NB** From `step030` on, there is a *vanilla* version that only uses `webgpu.h` and the default version relies on the shallow C++ wrapper `webgpu.hpp` generated by [WebGPU-C++](https://github.com/eliemichel/WebGPU-Cpp).
Building
--------
```
git checkout <the branch of your choice>
cmake . -B build
cmake --build build
```
Then run either `./build/App` (linux/macOS/MinGW) or `build\Debug\App.exe` (MSVC).
gitextract_6rd4e48e/ ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ └── cmake.yml ├── LICENSE └── README.md
Condensed preview — 4 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 872,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/workflows/cmake.yml",
"chars": 1318,
"preview": "name: CMake\n\n# Controls when the workflow will run\non:\n push:\n pull_request:\n workflow_dispatch:\n\nenv:\n BUILD_TYPE: "
},
{
"path": "LICENSE",
"chars": 1067,
"preview": "MIT License\nCopyright (c) 2022 Elie Michel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "README.md",
"chars": 1822,
"preview": "<div align=\"center\">\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent."
}
]
About this extraction
This page contains the full source code of the eliemichel/LearnWebGPU-Code GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 4 files (5.0 KB), approximately 1.5k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.