Support WebAssembly SIMD instructions in ahead-of-time translation

Open
#1,679 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@jlucaso1 is already working on this.

Since Oct 24, 2026.

  • #2149 by @jlucaso1 — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript, wasm
Domain
compilers

Research direction

Start with packages/compiler/src/wasm/binary.ts and the TRANSLATABLE feature list; run the reproduction and coverage command from the issue to confirm SIMD is reported as unsupported. Then trace the existing WebAssembly instruction translation path and its tests. Done means the SIMD instruction in the reproduction translates to native code and coverage no longer reports the module as unsupported.

Written by the indexing model from the issue text.

Description

Support WebAssembly SIMD in ahead-of-time translation. SIMD is currently outside the documented feature set and blocks the Rust WASM artifact shipped by @oxidezap/[email protected].

Reproduction

Use package.json with {"private":true,"type":"module"} and save as repro.ts:

const bytes = Buffer.from('AGFzbQEAAAABBAFgAAADAgEACgkBBwBBAP0PGgs=', 'base64')
console.log(WebAssembly.validate(bytes))
new WebAssembly.Module(bytes)
console.log('ok')

The module contains one SIMD instruction and no imports:

(module (func i32.const 0 i8x16.splat drop))
node repro.ts
node /path/to/scriptc/packages/cli/dist/main.js coverage repro.ts --print diagnostics

Node prints true and ok. Coverage exits 0 but classifies the module as:

{"status":"unsupported","features":["simd"],"unsupported":["simd"]}
Requested support

Translate SIMD instructions to native code. TRANSLATABLE in packages/compiler/src/wasm/binary.ts currently excludes simd.

#1617 and #1660 address rejection diagnostics. This request concerns translation support. #1395 introduced the initial WASM translation scope.

Recorded on Linux x86_64 with Node 24.19.0 and a source build reporting scriptc 0.4.0, at 0237d70df00475fa6251a432405070c43f2bc94c with #1660, #1656 and #1673 applied.

Dominant language
TypeScript
Stars
6.7k
Forks
229
Avg merge
14h 29m
Merged PRs (30d)
787

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel-labs/scriptc

All issues in vercel-labs/scriptc

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.