TypeScript/JavaScript interpreter and compiler to WebAssembly
| Object | Support Level |
|---|---|
| Object | Good - keys, values, entries, assign, defineProperty, etc. |
| Array | Good - most methods including iteration |
| String | Good - most methods |
| Number | Good |
| Math | Good |
| Function | Partial - no dynamic Function() |
| Date | Minimal - basic operations |
| RegExp | Minimal - literal parsing incomplete |
| Promise | Partial - async/await works |
| Proxy | Partial - basic traps |
| Reflect | Partial |
| JSON | Good - parse, stringify |
| console | Good - log |
| Category | Passed | Failed | Skipped | Total | Pass Rate |
|---|---|---|---|---|---|
| Math | 291 | 35 | 1 | 327 | 89.3% |
| language/statements | 6,532 | 1,230 | 763 | 8,525 | 84.1% |
| language/expressions | 5,983 | 1,701 | 2,653 | 10,337 | 77.8% |
| Boolean | 38 | 13 | 0 | 51 | 74.5% |
| Number | 249 | 84 | 2 | 335 | 74.8% |
| Promise | 459 | 180 | 0 | 639 | 71.8% |
| String | 796 | 412 | 7 | 1215 | 65.9% |
| Function | 285 | 154 | 70 | 509 | 64.9% |
| Object | 1671 | 1712 | 28 | 3411 | 49.4% |
| Date | 269 | 310 | 15 | 594 | 46.5% |
# Check for errors
moon check --deny-warn
# Run tests
moon test --target native
# Format code
moon fmt
# Run test262 (requires test262 repo in ./test262)
moon run src -- test262 test262.allowlist.txt
# Experimental AOT compilation (wasm-gc)
just experimental-aot-check # Check AOT compilability
just experimental-aot-compile # Compile fixtures to wasm
just experimental-aot-test # Run with wasmtimeInstall
Download zipTypeScript/JavaScript interpreter and compiler to WebAssembly