# Browser Stockfish engine source

This site distributes the unmodified Stockfish.js 18.0.8 lite single-threaded
engine from the `stockfish` npm package. Stockfish.js is copyright 2026
Chess.com, LLC, based on Stockfish by Tord Romstad, Marco Costalba, Joona Kiiski,
Gary Linscott and other contributors. See [AUTHORS](AUTHORS).

- [GPL version 3 license](Copying.txt)
- [Engine source and required neural network](stockfish-18.0.8-source.tar.gz)
- [Versions, provenance and SHA-256 checksums](distribution.json)
- [Neural-network CC0 license](NETWORK-CC0.txt)
- [Upstream source at the published npm commit](https://github.com/nmrugg/stockfish.js/tree/93c994592dcf3b4b21052ab925e9b534df9c0918)

The archive contains the upstream source tree at npm's published `gitHead`,
including C++ sources, JavaScript loader sources, Makefile and `build.js`, plus
the required `src/nn-9067e33176e8.nnue` network. The network bytes were verified
against the distributed WASM's initialized data segments. The upstream source
files are unmodified. This distribution adds the network, its license and this
build information. It contains no proprietary application source or data.

## Building the engine

Extract the archive, install the upstream-required Emscripten **3.1.7** toolchain
and activate it in your shell. Node.js and GNU Make are also needed. The upstream
script optionally uses `uglify-js` to minify its outer JavaScript wrapper; the
publisher does not pin that minifier in this source tree.

From the extracted `stockfish-18.0.8-source` directory:

```sh
node build.js --lite --single-threaded --no-split --strict-em-check --force
```

The required lite network is already included. Upstream's lite `make net` target
does not download that network automatically. Output is written beneath `src/`.
See `node build.js --help` and the included README for further build options.

The source-to-package mapping, distributed binary checksums and embedded network
were verified. A bit-for-bit rebuild has **not** been performed; wrapper output
can vary with the minifier and build year. The manifest records this explicitly.
The original JS/WASM files are distributed unchanged, with their upstream
copyright headers preserved.

The engine is a separate browser Worker speaking the standard UCI text protocol.
These notices describe the engine distribution; they do not change the license
of the proprietary application or constitute a legal assessment of that boundary.
