Skip to content

Gate direct wasm32 against native MLIR parity - #535

Merged
godofecht merged 2 commits into
mainfrom
test/wasm32-native-parity
Aug 17, 2026
Merged

godofecht merged 2 commits into
mainfrom
test/wasm32-native-parity

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Continues #528 after #534 landed allocation-backed direct wasm. Adds an explicit parity probe for the same alloc_sum.flow source: compile through Flow → MLIR → LLVM IR to a native shared library, execute alloc_sum() via ctypes, compile the identical source through the direct wasm32 target, execute it with the browser runtime under Node, and require the numerical results to match within 1e-6. The dedicated wasm workflow now treats native-MLIR parity as a first-class gate rather than inferring parity from separate expected constants.

@godofecht
godofecht marked this pull request as ready for review August 17, 2026 10:21
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@godofecht
godofecht merged commit 3f80358 into main Aug 17, 2026
18 checks passed
@godofecht
godofecht deleted the test/wasm32-native-parity branch August 18, 2026 07:24
godofecht added a commit that referenced this pull request Aug 18, 2026
The MLIR to wasm32 path landed across #529 through #535 with no docs, and
docs/language/wasm.md still listed "Direct WASM emission (skip C)" as
deferred with no backend planned.

- New "Direct wasm32 (no Emscripten)" section covering the pipeline, the
  `python -m flow.wasm_compiler` flags, export validation, linear-memory
  marshalling, the `env.malloc` import and the bump allocator in
  runtime/wasm/flow_runtime.mjs, the toolchain requirement, and what
  .github/workflows/wasm32.yml actually executes.
- Replaced the stale deferred row. libc is the thing still missing under
  the freestanding target, so that is what the row now says.
- Status matrix, "what works today" list, and the ROADMAP row name the
  second route. The ROADMAP cell also had an unescaped pipe splitting the
  table; escaped it.
- DEVELOPMENT.md: the pipeline diagram stopped at "MLIR (experimental)"
  and never mentioned LLVM IR or wasm32. Added both plus a component entry
  for wasm_compiler.py.
- docs/language/wasm.md and wasm-crossings.md were built but unreachable
  from the mkdocs nav. Added both.
- Refreshed docs/library/stdlib-api.md, which build_wiki.py regenerates:
  six modules added since the last commit of it (bigint, checked_arith,
  dsp, keys, rf, units_si), 105 to 111.

check_doc_links, check_wiki_links, build_wiki all pass; mkdocs warning
count unchanged at 171.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
godofecht added a commit that referenced this pull request Aug 18, 2026
…#539)

* docs: cover the direct wasm32 target

The MLIR to wasm32 path landed across #529 through #535 with no docs, and
docs/language/wasm.md still listed "Direct WASM emission (skip C)" as
deferred with no backend planned.

- New "Direct wasm32 (no Emscripten)" section covering the pipeline, the
  `python -m flow.wasm_compiler` flags, export validation, linear-memory
  marshalling, the `env.malloc` import and the bump allocator in
  runtime/wasm/flow_runtime.mjs, the toolchain requirement, and what
  .github/workflows/wasm32.yml actually executes.
- Replaced the stale deferred row. libc is the thing still missing under
  the freestanding target, so that is what the row now says.
- Status matrix, "what works today" list, and the ROADMAP row name the
  second route. The ROADMAP cell also had an unescaped pipe splitting the
  table; escaped it.
- DEVELOPMENT.md: the pipeline diagram stopped at "MLIR (experimental)"
  and never mentioned LLVM IR or wasm32. Added both plus a component entry
  for wasm_compiler.py.
- docs/language/wasm.md and wasm-crossings.md were built but unreachable
  from the mkdocs nav. Added both.
- Refreshed docs/library/stdlib-api.md, which build_wiki.py regenerates:
  six modules added since the last commit of it (bigint, checked_arith,
  dsp, keys, rf, units_si), 105 to 111.

check_doc_links, check_wiki_links, build_wiki all pass; mkdocs warning
count unchanged at 171.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* ci: fire CI on docs-only changes

The version and doc-links jobs carry a comment saying they are
deliberately ungated at the job level, because the drift-prone files
(README.md, CITATION.cff, flow.toml, docs/LANGUAGE_SPEC.md) sit outside
every paths-filter. The workflow-level paths defeated that: no docs path
was listed, so a docs-only PR never started the workflow and neither job
ran. The docs PR this rides on got three checks, none of them the link
checker.

Added docs/**, mkdocs.yml, CITATION.cff and **.md to both triggers. Every
expensive job stays gated on the changes filter, so a docs-only run is
still just changes, version, doc-links and the aggregator.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: mark the wasm32 backend covered now that it has a page

check_doc_coverage.py exempted backend:wasm_compiler with a reason naming
this branch. The page exists here, so the exemption becomes a real mapping.

Backends: 9/9 covered, nothing exempt.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant