Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Repository layout

PathHolds
src/The engine’s TypeScript, by stage: demux/, decode/, then presentation/ and the audio output in audio/, beside capability/, color/, validation/, and the orchestration in pipeline/. See Module map
src/EngineAssets.tsThe typed names of every file the engine fetches at runtime, and their URL resolution
src/EngineConfiguration.tsThe feature flags a host can set
src/capability/vectors/Hand-made vectors: embedded TypeScript vectors, streams no script generates (qualification/), and inputs that only tests and generators read (test/)
test/The Vitest suites, mirroring src/, and shared helpers in test/helpers/
sandbox/The testing sandbox, a local web app that plays media from a picked folder through the engine: its Vite config, page, and sources in src/. See Sandbox
wasm/The engine’s own WebAssembly modules and their build: the libdovi crate, the audio output stage, license texts, and the Makefile. See WebAssembly build
wgpud/The submodule of webgpu-player-decoders: the decoder projects, each of which builds one decoder package, with its tests in test/, their shared build rules, and atmos/, the Dolby Atmos sources the eac3 and truehd projects compile in. See WebAssembly build
wgpup/The submodule of webgpu-player-passes: the pass projects, whose WGSL pass files a host offers as optional passes, and the license texts of their upstream sources. See Bundled passes
vendor/The FFmpeg and dcadec submodules, fetched only by make -C wgpud sources, and the Mediabunny fork in vendor/mediabunny/, which every checkout needs (see Set up a checkout)
scripts/build.mjs (the served assets), library-assets.mjs (which file is served from where), pinned-releases.mjs (the pinned decoder and pass releases’ install), decoder-packages.mjs (the decoder projects’ build), pass-files.mjs (the pass projects’ copy), generate-atmos-hrir.mjs (the head-related impulse responses the Atmos binaural renderer carries), and the codec vector generators. See Codec vectors
tools/Development tooling that never ships, constants.json, and pinned-releases.json, the pinned decoder and pass releases. See Tools and Pinned releases
docs/This book: chapters in src/, PlantUML sources in diagrams/ and their SVGs in src/diagrams/, stylesheets, scripts, and the favicon in theme/, and the built book in book/
images/The project logo, webgpu-player-logo.svg, the Inkscape source of the favicon
bin/Generated files, all ignored except bin/codec_vector_assets/. See below

bin/ holds:

  • bin/wasm/: the engine modules’ builds from make -C wasm.
  • bin/wgpud/: the decoder packages of the pinned release from npm run pinned-releases, or local builds from npm run decoders.
  • bin/wgpup/: the pass files of the pinned release from npm run pinned-releases, or local copies from npm run passes.
  • bin/installed-releases.json: the files npm run pinned-releases installed, with their SHA-256.
  • bin/libraries/ and bin/build-info.json: the served assets from npm run build.
  • bin/playback_smoke_media/: local playback media from the smoke media generators.
  • bin/plantuml/: the pinned PlantUML jar that tools/render-diagrams.mjs downloads.
  • bin/emsdk/: the engine’s own emsdk at the pinned Emscripten, which make -C wasm emsdk installs and the Makefiles use when EMSDK is unset.
  • bin/codec_vector_assets/: the generated codec vectors. This is the one committed folder, so every change to a vector shows in review.

Folder names live in one file

tools/constants.json names every engine folder. Read a path from it instead of spelling it out, so moving a folder is a one-line change.

ReaderReads it through
Node scripts, tools, and eslint.config.mjstools/constants.mjs
Python tools and scripts/generate_all_codec_vector_assets.pytools/constants.py
scripts/codec_vector_assets/engine_layout.py, which re-exports tools/constants.py
Teststest/helpers/enginePaths.ts
vitest.config.tsA JSON import
sandbox/vite.config.ts and sandbox/src/main.tsA JSON import
build.sh, wasm/Makefile, wgpud/Makefile, and wgpud/rules.mknode -p, which is why WebAssembly builds need Node.js
HostsThe file itself, at <engine>/tools/constants.json

Some files cannot read it. Recipes lists them.