Skip to content

feat(stdlib): Perry-native reimplementation of imperative-runtime JIT libs (find-my-way router) #1682

@proggeramlug

Description

@proggeramlug

Part of #1677. Blocked by #1681 — do not start until it is merged to main and parity-green.

Problem

find-my-way (Fastify's router) JITs its matcher from routes registered via scattered .on('GET', '/path', handler) calls during app startup. Capturing that at build time means staging the app's init phase — fragile. The realistic answer is a Perry-native equivalent.

Scope

For JIT libraries where the codegen input is assembled by imperative runtime calls and build-time evaluation (Phase 3) is infeasible:

  • Ship a Perry-native equivalent behind compilePackages.
  • find-my-way radix-tree matcher first — native route registration + lookup, no runtime new Function.

Acceptance criteria

  • A Fastify routing sample resolves a representative route table with the native matcher, with no runtime new Function.
  • Byte-for-byte parity vs node on route resolution (params, wildcards, constraints as scoped).
  • Merged to main, lint clean, parity-green.

Follow-up (after this phase ships)

Re-evaluate whether perry-jsruntime / embedded V8 can be dropped from default builds entirely, using the Phase 0 instrumentation to confirm nothing in the target workloads still routes to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparityNode.js compatibility / parity gaps

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions