Support WebAssembly SIMD instructions in ahead-of-time translation
Maintainers usually reply within 1 day
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel-labs/scriptc
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
vercel-labs/scriptc#4865 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
vercel-labs/scriptc#4864 ·
Maintainers usually reply within 1 day
-
Windows ARM64 as a cross-compile targetPossibly taken @hum-n claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
vercel-labs/scriptc#4858 ·
Maintainers usually reply within 1 day
-
post-merge-bisect-unresolved
Difficulty 3/5 1-2 days Newbie friendliness 43/100
vercel-labs/scriptc#4791 ·
Maintainers usually reply within 1 day
-
post-merge-bisect-unconfirmed
Difficulty 5/5 Over a week Newbie friendliness 12/100
vercel-labs/scriptc#4755 · 1 comment ·
Maintainers usually reply within 1 day
All issues in vercel-labs/scriptc
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day