scriptc: Compiles TypeScript and JavaScript to native executables and WebAssembly.
What problem it solves
TypeScript and JavaScript programs often require a Node.js runtime and their imported npm packages at execution time. scriptc addresses this by compiling programs into native outputs while using TypeScript's checked types, and it reports unsupported code at build time with diagnostics and rewrite hints where available.
Key features
Native and WebAssembly compilation — Compile TypeScript and JavaScript into native executables or WebAssembly outputs.
Source: README
Type-informed machine code — The compiler uses types checked by the TypeScript compiler when generating machine code.
Source: README
Node API support — A supported subset of Node.js APIs can compile to the native runtime, including APIs used to create an HTTP server.
Source: README, internal
npm package compilation — Imported npm packages are compiled into the executable, so the resulting program does not read node_modules at runtime.
Source: README
Coverage and build diagnostics — Coverage can be checked before building, while unsupported code is reported during compilation with a diagnostic and, where available, a rewrite hint.
Source: README
Quick start
Copied verbatim from the project's README.
$ npm install -g scriptcconst who = process.argv.length > 2 ? process.argv[2] : "world";
console.log(`hello, ${who}`);$ scriptc run hello.ts
hello, worldWho it may suit
Inference: this may suit TypeScript and JavaScript developers who want to produce native executables or WebAssembly modules, particularly when evaluating whether an existing program fits the supported subset.
Topics to discuss
Which Node.js APIs and language features should receive compile support next?
How can coverage diagnostics better guide partial programs toward successful builds?
Which npm package compatibility patterns should be documented or supported first?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/vercel-labs/scriptc#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…