Pagefind 1.5.2 search source

The distributed WebAssembly links pagefind_microjson 0.1.4 (GPL-3.0-only).
The combined search runtime is provided under GPL-3.0-only; original MIT,
BSD, Blue Oak and other compatible component notices remain applicable.
The GPL license text is in licenses/pagefind_microjson.txt.
Source files are unmodified upstream version 1.5.2. Source and dependencies
are supplied here without charge alongside the browser binaries. No site
content or unrelated applications are part of this archive.

Build prerequisites: Node.js, Cargo/Rust nightly-2026-04-12 (producer
rustc 1.97.0-nightly bf4fbfb7a), rust-src and wasm32-unknown-unknown target,
wasm-pack, wasm-bindgen 0.2.117, Binaryen wasm-opt, bash, gzip.
These are generally available build tools/system libraries.

All Cargo registry packages resolved by pagefind_web/Cargo.lock are included
as original checksum-verified .crate source archives in vendor-crates/.
All runtime JavaScript packages resolved by the component UI lockfile are
included as original npm source archives in vendor-npm/.
Unpack a .crate/.tgz with tar -xzf if inspecting or configuring offline
dependencies; Cargo checksums are recorded in the supplied Cargo.lock.

To build the generic and English WASM, use the upstream commands in
pagefind-1.5.2/pagefind_web/local_fast_build.sh (run from pagefind_web/).
The full-language build is local_build.sh. Cargo.toml and Cargo.lock are
the upstream build inputs. Run rustup component add rust-src and
rustup target add wasm32-unknown-unknown for the selected nightly.
Set GIT_VERSION=1.5.2. The script uses wasm-pack --release -t no-modules,
-Z build-std=panic_abort,std and immediate-abort flags, adds the
pagefind_dcd prefix, then gzip-compresses the resulting WASM.

JavaScript search/worker and component UI: in pagefind_web_js/ and
pagefind_ui/component/, run npm ci, then node build.js. The entry files,
esbuild scripts, source and npm lockfiles are included. Vendor outputs
are placed under pagefind/vendor/. The Pagefind CLI (pagefind/; root
Cargo.toml/lock included) embeds these files and emits them via pagefind
--site <static-site>. Browser output filenames are renamed by that CLI.

Packaging changes (October 4, 2026): the supplied script normalizes
non-executable data labels and removes unused optional custom sections from
generated WebAssembly. It does not alter executable code or search logic.
Apply packaging/redact-wasm-paths.mjs to the gzip-compressed Pagefind WASM
outputs after the upstream build. For example:

node --input-type=module -e "import fs from 'node:fs'; import {redactWasmPaths}
from './packaging/redact-wasm-paths.mjs'; const f=process.argv[1];
fs.writeFileSync(f,redactWasmPaths(fs.readFileSync(f)));" wasm.en.pagefind

Repeat for wasm.unknown.pagefind. Node.js uses its standard zlib and
WebAssembly validation APIs. Search algorithms remain unchanged.
Build timestamps, gzip headers and tool revisions may prevent byte-identical
reproduction. The published WASM and JavaScript input SHA-256 values are
recorded in the site license audit. Site packaging adds notice headers and
omits unused legacy UI/highlight bundles; these changes do not alter search
algorithms.
