mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-22 05:59:31 +08:00
- Cache native compilation inputs and enable Node 24 bytecode caching - Memoize frontend type lowering and reduce checker overfetch - Add dev-mode library optimization and phase timing
17 lines
528 B
JavaScript
17 lines
528 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { enableCompileCache } from "node:module";
|
|
|
|
// Node 24 can persist V8's compiled module bytecode. scriptc's CLI imports
|
|
// the compiler and its lowering/backend graph before handling any command, so
|
|
// enabling this in the tiny bootstrap avoids reparsing that graph on every
|
|
// edit/build invocation.
|
|
try {
|
|
enableCompileCache();
|
|
} catch {
|
|
// Bytecode caching is an optimization boundary. A read-only temp directory
|
|
// must never prevent the compiler from running.
|
|
}
|
|
|
|
await import("./main.js");
|