Skip to content

Tracker: AOT-first eval/new Function strategy — evaporate runtime dynamism at build time #1677

Description

@proggeramlug

Goal

Make Perry handle eval / new Function the way an AOT compiler should: never execute a code-string at runtime. Every legitimate case is resolved at or before build time, so the runtime JS engine (perry-jsruntime / embedded V8) becomes deletable from shipped binaries.

What the investigation found (verified against vendored sources)

Conclusion: a runtime interpreter ("PerryVM") has no use case here. The only place an evaluator is needed is build time, and we already own one (V8) — so the move is to demote V8 to a build-time tool, not embed it at runtime.

Phases (strictly gated)

Each phase must be merged to main and parity-green before the next is started. No parallel work across phases.

End state

A Perry binary that links no runtime JS engine, where:

  1. constant code-strings became native functions (P1),
  2. schema/template codegen libraries ran at build time and emitted native code (P2/P3),
  3. the few imperative-runtime JITs have native equivalents (P4),
  4. anything left over is a clear compile error naming the package and call site (P0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions