Skip to content

Implement dual WASM module build process with SIMD and baseline support#14

Open
dngda wants to merge 1 commit intoWhiskeySockets:masterfrom
dngda:simd-unsupported
Open

Implement dual WASM module build process with SIMD and baseline support#14
dngda wants to merge 1 commit intoWhiskeySockets:masterfrom
dngda:simd-unsupported

Conversation

@dngda
Copy link
Copy Markdown

@dngda dngda commented Mar 11, 2026

This pull request introduces dual WASM module builds (SIMD and baseline) and updates the loading logic to dynamically select the appropriate module based on runtime SIMD support. The changes improve compatibility across environments and streamline the build process.

Build system improvements:

  • Added a new script scripts/build-dual.ts to automate building both SIMD and non-SIMD WASM modules, including config modifications and restoring, and reporting build sizes. (build:wasm in package.json now uses this script) [1] [2]

WASM module loading enhancements:

  • Updated ts/index.ts to detect WASM SIMD support at runtime and load either the SIMD or baseline WASM module accordingly, improving compatibility.
  • Modified ts/macro.ts to export both base64Wasm and base64WasmNoSimd, enabling access to both module variants for dynamic loading.
  • Updated imports in ts/index.ts to include base64WasmNoSimd for dual module support.

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