Documentation
¶
Overview ¶
Command gen_highs syncs the HiGHS solver artifacts from the npm `highs` package into the repo.
It copies node_modules/highs/build/highs.wasm to ui/worker/highs.wasm and generates ui/worker/highs_names_gen.go, which maps emscripten's symbolic import/export names to the single-letter names the wasm actually uses.
That map is why this tool exists. The npm package is built with -sMINIFY_WASM_IMPORTS_AND_EXPORTS, so highs.wasm imports "a"."f" and exports "y" rather than __syscall_openat and _Highs_run. Which letter means what changes with every upstream build, so the Go wazero host (sim/core/reforge_optimizer/highswasm.go) cannot hardcode them; it looks them up by symbolic name through the generated map instead.
Run via `make update-highs` after changing the pinned `highs` version in package.json.