Skip to content

Use custom Binaryen build, cleanup Wasm-related code#536

Merged
LPTK merged 9 commits into
hkust-taco:hkmc2from
Derppening:enhance/use-custom-binaryen
Jun 30, 2026
Merged

Use custom Binaryen build, cleanup Wasm-related code#536
LPTK merged 9 commits into
hkust-taco:hkmc2from
Derppening:enhance/use-custom-binaryen

Conversation

@Derppening

Copy link
Copy Markdown
Contributor

This PR switches to our (my) personally maintained build of Binaryen, which is just the latest release with the parseTextWithFeatures API tacked on top of it. A regression test is also added for the parseText issue

The relevant PR in Binaryen's repository is here.

Also cleans up the Wasm-related code by:

  • Using let for function locals
  • Refactoring to use synchronous APIs when instantiating WebAssembly.Instance for execution

@Derppening Derppening requested a review from LPTK June 29, 2026 09:14
@Derppening Derppening mentioned this pull request Jun 29, 2026
@LPTK

LPTK commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Cool! But please push your changes to https://github.com/hkust-taco/binaryen and make the build point to that one instead.

Comment thread hkmc2/shared/src/test/mlscript/decls/Prelude.mls
@Derppening

Copy link
Copy Markdown
Contributor Author

Cool! But please push your changes to https://github.com/hkust-taco/binaryen and make the build point to that one instead.

Could you also fork binaryen.js as well? This repo is the one that actually contains the npm wrappers over the JS API bindings.

@LPTK

LPTK commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Right. Done! https://github.com/hkust-taco/binaryen.js

@Derppening

Copy link
Copy Markdown
Contributor Author

Done in 6516cdd and e7d1cbc - We are using our own fork of binaryen now.

@LPTK LPTK merged commit 59ee4c9 into hkust-taco:hkmc2 Jun 30, 2026
1 check passed
@LPTK LPTK deleted the enhance/use-custom-binaryen branch June 30, 2026 08:36
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.

2 participants