Skip to content

Execute allocation-backed Flow under direct wasm32 - #534

Merged
godofecht merged 10 commits into
mainfrom
feat/wasm32-allocation-smoke
Aug 17, 2026
Merged

godofecht merged 10 commits into
mainfrom
feat/wasm32-allocation-smoke

Conversation

@godofecht

@godofecht godofecht commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Continues #528 after scalar exports and host-written linear-memory pointers were proven in #530/#532.

This adds a dynamic array<f32> fixture that allocates storage inside Flow, writes values, and returns their sum. The work exposed and fixes an MLIR backend bug where parser-normalized generic constructors such as array_f32 bypassed the existing array<T> lowering and became an invalid ordinary func.call returning i32 instead of memref<?xf32>.

The resulting wasm module imports exactly env.malloc. This PR therefore adds a minimal reusable browser ESM runtime implementing that contract as a linear-memory bump allocator, growing the module's exported memory from its existing end so it cannot collide with linker-owned data/stack. CI compiles through Flow → MLIR → LLVM IR → wasm32, instantiates under Node, and repeatedly executes the allocation-backed Flow function with the expected numerical result.

This advances #528 through the allocation/runtime milestone; native-MLIR numerical parity and flow-scikit browser migration remain follow-up acceptance work.

@godofecht
godofecht marked this pull request as ready for review August 17, 2026 10:18
@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 d1bc667 into main Aug 17, 2026
17 checks passed
@godofecht
godofecht deleted the feat/wasm32-allocation-smoke branch August 18, 2026 07:24
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