Motivating Question
tsc
tends to be the bottleneck in modern TS toolchains. Native compilers likeesbuild
andswc
are amazing, but they don’t perform type-checking, so you still needtsc
as part of your build process. Would it be possible to speed uptsc
by opaquely compiling it from a JIT’ed JavaScript program into some more optimal format like WASM or native?
Notes
- The author of swc, kdy1dev is working on porting tsc to Go in order to remove the need for tsc in many cases.
- This may not be worth the effort, but seeing as how quickly native compilers gained adoption within the TS ecosystem, a similar solution for replacing the type-checking and generation portions of
tsc
would have huge implications.
Projects
- TypeScript-like language for WebAssembly
- JavaScript to WebAssembly toolchain
- Run your JavaScript on WebAssembly. Javy takes your JavaScript code, and executes it in a WebAssembly embedded JavaScript runtime.
- The leading WebAssembly Runtime supporting WASI and Emscripten
- Run any code on any client — with WebAssembly and Wasmer
- Compiler infrastructure and toolchain library for WebAssembly
- Standalone JIT-style runtime for WebAssembly, using Cranelift
- Compile a Node.js project into a single file. Supports TypeScript, binary addons, dynamic requires.
- Minimalist bytecode compiler for Node.js
- A low-level programming language inspired by TypeScript
- Related
- JavaScript native compiler. No bytecode no VM, just pure native binaries
- A JavaScript-like syntax for WebAssembly text format
- Require hook for automatic V8 compile cache persistence