Parent: #126
Corresponds to EN-058 and EN-059 in docs/tickets.md
Problem
Two cross-platform correctness gaps can invalidate otherwise working rendering/features:
- Windows ray-query paths require DXC runtime DLLs, but packaging does not reliably deploy them and fallback can be silent.
- Non-ASCII file text can be decoded byte-by-byte/Latin-1 somewhere between platform file IO, Perry strings, world loading, and text rendering, producing mojibake.
Both are symptoms of an undefined runtime-asset/text boundary.
Outcome
A tested platform runtime contract for shipping shader compiler dependencies/data files and moving UTF-8 text from disk/fetch through Perry and Bloom without corruption.
Windows shader runtime
- Decide and document how
dxcompiler.dll and dxil.dll are versioned, fetched/built, licensed, packaged, and located at runtime.
- Integrate
tools/fetch-dxc.ps1 (or replacement) into developer build and release packaging; do not rely on untracked files in the current directory.
- Verify hashes/version and fail packaging on missing files.
- At startup report requested compiler/path, selected DXC/FXC state, and capabilities lost by fallback.
- If ray-query/path tracing is explicitly requested and DXC is unavailable, return an actionable error; do not silently start a visually different path.
- Package-install smoke must launch from the installed artifact directory on a clean Windows runner.
UTF-8 contract
- Trace bytes at platform read/fetch, Perry materialization, FFI boundary, JSON/world parser, and glyph lookup to locate the first corruption.
- Define file text APIs as UTF-8 with strict or replacement behavior; expose separate binary byte-buffer APIs.
- Pass string length explicitly where NUL/embedded bytes matter.
- Test BMP and non-BMP characters, combining marks, RTL samples, emoji, malformed UTF-8, and embedded NUL policy.
- Ensure JSON/world names, UI/text rendering, asset paths supported by the platform, and error messages preserve text.
- If the defect is in Perry, file/link the upstream issue and add a Bloom regression test that remains skipped only with a version-bounded reason.
General runtime asset manifest
Release artifacts should have a machine-checked manifest listing required runtime DLLs, shader libraries/metallibs, fonts/data, WASM glue, and licenses/hashes. Each target's packaging test validates the manifest and starts a minimal renderer/app when possible.
Acceptance criteria
Likely files
tools/fetch-dxc.ps1, Windows build/release scripts and native/windows/src/lib.rs
- platform file IO implementations and shared string/FFI code
src/world/loader.ts, text/UI surface
.github/workflows/release.yml
- platform target docs
Non-goals
- Bundling arbitrary game assets into the engine package.
- Implementing full international text shaping in this issue unless the current text renderer already claims it.
- Treating FXC fallback as equivalent to DXC ray-query support.
Dependencies
Can start immediately. Coordinate string ABI with #141 and packaging smoke with #140.
Parent: #126
Corresponds to EN-058 and EN-059 in
docs/tickets.mdProblem
Two cross-platform correctness gaps can invalidate otherwise working rendering/features:
Both are symptoms of an undefined runtime-asset/text boundary.
Outcome
A tested platform runtime contract for shipping shader compiler dependencies/data files and moving UTF-8 text from disk/fetch through Perry and Bloom without corruption.
Windows shader runtime
dxcompiler.dllanddxil.dllare versioned, fetched/built, licensed, packaged, and located at runtime.tools/fetch-dxc.ps1(or replacement) into developer build and release packaging; do not rely on untracked files in the current directory.UTF-8 contract
General runtime asset manifest
Release artifacts should have a machine-checked manifest listing required runtime DLLs, shader libraries/metallibs, fonts/data, WASM glue, and licenses/hashes. Each target's packaging test validates the manifest and starts a minimal renderer/app when possible.
Acceptance criteria
Arena 02 — Outdoor plazaand a multilingual/emoji fixture round-trip from UTF-8 file through world/UI/text output without mojibake on native and web.Likely files
tools/fetch-dxc.ps1, Windows build/release scripts andnative/windows/src/lib.rssrc/world/loader.ts, text/UI surface.github/workflows/release.ymlNon-goals
Dependencies
Can start immediately. Coordinate string ABI with #141 and packaging smoke with #140.