# Rebuilding The Stockfish Runtime Asset

The files in this directory are distributed as a separate browser UCI engine
runtime component:

- `stockfish.js`
- `stockfish.wasm`

The published GPL runtime package used by Inchess is available at:

- runtime repository: `https://github.com/msgridin/inchess-stockfish-runtime`
- runtime release: `https://github.com/msgridin/inchess-stockfish-runtime/releases/tag/stockfish-18.0.7-inchess.1`
- runtime tag: `stockfish-18.0.7-inchess.1`
- runtime commit: `16ba5b8 Harden Stockfish runtime compliance metadata`

They were copied from the npm package `stockfish@18.0.7`:

- package tarball: `https://registry.npmjs.org/stockfish/-/stockfish-18.0.7.tgz`
- source repository: `https://github.com/nmrugg/stockfish.js`
- package build version: `18`

The source package documents the build process in its README. At the time these
assets were recorded, the package README required Emscripten `3.1.7` and used
the Stockfish.js build script:

```sh
./build.js --single-threaded --lite -f
```

After rebuilding, copy the generated lite single-threaded Stockfish 18 files to:

```text
public/engines/stockfish/18/stockfish.js
public/engines/stockfish/18/stockfish.wasm
```

Before release, update `SOURCE.txt`, `NOTICE.txt`, and `manifest.json` with the
exact package version, commit or source archive, and any changed asset list.
