Repository layout
| Path | Holds |
|---|---|
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.ts | The typed names of every file the engine fetches at runtime, and their URL resolution |
src/EngineConfiguration.ts | The 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 frommake -C wasm.bin/wgpud/: the decoder packages of the pinned release fromnpm run pinned-releases, or local builds fromnpm run decoders.bin/wgpup/: the pass files of the pinned release fromnpm run pinned-releases, or local copies fromnpm run passes.bin/installed-releases.json: the filesnpm run pinned-releasesinstalled, with their SHA-256.bin/libraries/andbin/build-info.json: the served assets fromnpm run build.bin/playback_smoke_media/: local playback media from the smoke media generators.bin/plantuml/: the pinned PlantUML jar thattools/render-diagrams.mjsdownloads.bin/emsdk/: the engine’s own emsdk at the pinned Emscripten, whichmake -C wasm emsdkinstalls and the Makefiles use whenEMSDKis 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.
| Reader | Reads it through |
|---|---|
Node scripts, tools, and eslint.config.mjs | tools/constants.mjs |
Python tools and scripts/generate_all_codec_vector_assets.py | tools/constants.py |
scripts/codec_vector_assets/ | engine_layout.py, which re-exports tools/constants.py |
| Tests | test/helpers/enginePaths.ts |
vitest.config.ts | A JSON import |
sandbox/vite.config.ts and sandbox/src/main.ts | A JSON import |
build.sh, wasm/Makefile, wgpud/Makefile, and wgpud/rules.mk | node -p, which is why WebAssembly builds need Node.js |
| Hosts | The file itself, at <engine>/tools/constants.json |
Some files cannot read it. Recipes lists them.