Stockfish.js 19.0.1 lite single-threaded: provenance and build instructions ======================================================================= The two engine artifacts in this directory are UNMODIFIED release downloads: https://github.com/nmrugg/stockfish.js/releases/download/v19.0.1/stockfish-19-lite-single.js https://github.com/nmrugg/stockfish.js/releases/download/v19.0.1/stockfish-19-lite-single.wasm Release tag: v19.0.1 Tag object: 8d9ca57043594a8fa6ae0b73fb685d9105bf51df Source commit: 0d5dd7944f88c817c07a26bc4fb1905d5f9c46d6 Upstream source: https://github.com/nmrugg/stockfish.js Archive download: https://codeload.github.com/nmrugg/stockfish.js/zip/0d5dd7944f88c817c07a26bc4fb1905d5f9c46d6 Local copy: stockfish.js-19.0.1-source.zip (unchanged upstream ZIP bytes). ZIP avoids Vite treating a .gz file as HTTP Content-Encoding: gzip, which transparently decompresses browser downloads and invalidates their hash. The archive is the entire tracked tree at the pinned revision, not vanilla official-stockfish/Stockfish. It includes build.js, package.json, src/Makefile, src/emscripten/* (browser loader, single-threaded Asyncify flags, credits and pre/post JS), scripts/net.sh, the modified C++ and the included incbin header. Generated build-flags.js and wasm_embedded_lite_network.h are created by build.js. There are no source submodules to fetch. Copyright/license notices are intact. The NNUE asset is not tracked in that upstream archive, so it is supplied here separately as part of the corresponding source package: nn-61e7af4bb97d.nnue (1,166,381 bytes) Downloaded from: https://tests.stockfishchess.org/api/nn/nn-61e7af4bb97d.nnue SHA-256: 61e7af4bb97d51eeeb25d322916f86513b5cd3a827ce189c98c6e31946f99e5b Credits: Chris Bao (sscg13), as stated in src/emscripten/credits-lite.js. src/evaluate.h selects this net for USE_LITE_NET; build.js embeds exactly this asset for --lite. The full-size default net is not used or required for this build. The supplied network's complete bytes match the initialized WASM memory at offset 39600 (the binary splits the bytes across optimized data segments). Building from the local source downloads --------------------------------------- Use a fresh directory outside any enclosing Git checkout. General-purpose build tools are prerequisites, not included here: unzip, Node.js/npm, GNU Make, Python 3, and the Emscripten SDK 6.0.9 (with its LLVM/Binaryen/Closure toolchain). Upstream build.js checks for Emscripten 6.0.9; package.json pins Terser 5.51.2. SDK setup: https://emscripten.org/docs/getting_started/downloads.html After installing/activating SDK 6.0.9, source its emsdk_env.sh so emcc and em++ are in PATH. Verify with `emcc --version`. Download this directory's source archive, NNUE and SHA256SUMS, plus any other files you want to verify. With all listed files present, verify: sha256sum -c SHA256SUMS Then, from the directory containing the downloads: unzip stockfish.js-19.0.1-source.zip cp nn-61e7af4bb97d.nnue stockfish.js-0d5dd7944f88c817c07a26bc4fb1905d5f9c46d6/src/ cd stockfish.js-0d5dd7944f88c817c07a26bc4fb1905d5f9c46d6 npm install --ignore-scripts node build.js --lite --single-threaded --no-split --strict-em-check -f This builds ONLY the lite single-threaded variant. Do not use --all or npm pack: the latter invokes upstream's prepack script, which builds the other variants. Expected outputs: src/stockfish-19-lite-single.js src/stockfish-19-lite-single.wasm The existing local NNUE is hash-validated by scripts/net.sh; it need not be downloaded again. The standard build tools and npm dependencies still need to be installed. No other project-specific source or network is needed. Serve these outputs side by side over HTTP(S), with JavaScript and application/wasm MIME types. Start a classic Web Worker from the JS URL and exchange standard UCI text messages through postMessage/onmessage. No cross-origin-isolation headers or SharedArrayBuffer are required for this single-threaded build. Browsers need WebAssembly SIMD support. Verification scope ------------------ The shipped JS/WASM checksums match the GitHub release asset SHA-256 digests. The source archive was checked against the pinned upstream checkout, and the required lite network was checked against its name/hash and embedded WASM bytes. These instructions are based on the actual pinned build script and Makefiles. A local recompilation and bit-for-bit reproducibility have NOT been verified. Toolchain versions, timestamps and Git build metadata can affect rebuild bytes; SHA256SUMS identifies the supplied upstream files, not promised rebuild outputs. Licensing --------- See Copying.txt for GPLv3 and AUTHORS for upstream authors. Engine source files carry GPLv3-or-later notices; the release labels the engine GPLv3. Upstream README describes non-engine code as MIT licensed; all upstream notices remain in the archive. No extra restrictions are imposed by Squarecaster on the GPL rights. The engine is supplied WITHOUT ANY WARRANTY, including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This engineering inventory is not a legal opinion about the licensing boundaries of a larger application.