Part of #1677. Blocked by #1679 — do not start until it is merged to main and parity-green.
Problem
Several codegen libraries already ship an eval-free path (built for CSP environments) that emits plain source at build time. Where that exists, Perry should consume the standalone output instead of trying to run the JIT at all — zero new infra, highest ROI.
Scope
A package.json / perry build convention that routes recognized codegen libraries to their build-time output and compiles that output natively. Land ajv as the proof:
ajv/standalone emits precompiled validator modules → feed them to Perry's normal compile path.
- Document the same convention for:
prisma generate, drizzle-kit introspect, kysely-codegen, Vue SFC compiler. (Document + wire the hook; per-library adoption can follow.)
Acceptance criteria (the gate for Phase 3)
- A sample that validates input with ajv compiles via
ajv/standalone, links no runtime V8, and is byte-parity vs node.
- The convention is documented (how a package declares its build-time codegen entry point).
- Merged to
main, lint clean, parity-green.
Out of scope
Libraries with no standalone mode (fast-json-stringify, find-my-way) — Phases 3 and 4.
Part of #1677. Blocked by #1679 — do not start until it is merged to
mainand parity-green.Problem
Several codegen libraries already ship an eval-free path (built for CSP environments) that emits plain source at build time. Where that exists, Perry should consume the standalone output instead of trying to run the JIT at all — zero new infra, highest ROI.
Scope
A
package.json/perrybuild convention that routes recognized codegen libraries to their build-time output and compiles that output natively. Land ajv as the proof:ajv/standaloneemits precompiled validator modules → feed them to Perry's normal compile path.prisma generate,drizzle-kit introspect,kysely-codegen, Vue SFC compiler. (Document + wire the hook; per-library adoption can follow.)Acceptance criteria (the gate for Phase 3)
ajv/standalone, links no runtime V8, and is byte-parity vs node.main, lint clean, parity-green.Out of scope
Libraries with no standalone mode (
fast-json-stringify,find-my-way) — Phases 3 and 4.