# Renegade 1.3.1 — local engine

Upstream: https://github.com/pkrisz99/Renegade/tree/bb590fdff3d6f9763ad6aed040ee53c89faea507
Copyright (c) 2022–2026 Krisztián Peőcz. MIT License; full text is in
`public/engine/LICENSE-renegade.txt`. The upstream network is unchanged.

The archive `renegade-1.3.1-bb590fd.tar.gz` contains the pinned upstream source.
`renegade-port/port.patch` records every change to that source, and `Bridge.cpp`
provides the application bridge. These port changes are also offered under MIT.
The original application, branding and media keep their separate rights.

Build with Python 3 and the official Emscripten SDK 6.0.10:

    python3 scripts/build-renegade.py --emsdk /path/to/emsdk --output /empty/output/path

The command verifies the upstream archive, extracts only the required C++ files,
applies the patch, and builds both SIMD and scalar variants with the same options.
Set EMSDK_PYTHON when the SDK needs a particular Python runtime. It does not
download dependencies, edit global configuration or overwrite the app assets.
Compare its four .mjs/.wasm outputs with `vendor/renegade-provenance.json`.
The separate `renegade-net-36.bin` is copied unchanged from the upstream archive.
The UI worker and original handicap policy are in `public/engine`.

The port uses a single Web Worker without SharedArrayBuffer or operating-system
threads. Full-strength single-PV search and evaluation preserve the upstream
algorithm. Added MultiPV emits only complete iterations; cooperative yielding
permits cancellation. The scalar build supports WebViews without WASM SIMD.
Incbin is replaced by local network loading and is not compiled into this port.
Toolchain runtime notices are included in public/engine and app licenses.

Run `npm run verify:engine` to validate source, network, binaries and notices.
Quality evidence and limitations are documented in ENGINE_MIGRATION.md.
