Skip to content

ABI: implement private module-loader evaluation and import #245

Description

@chrisbbreuer

Parent: #140
Related: #134, #163, #164, #208

Implement the three shared private module-loader entry points against zig-js own module registry, evaluator, and Promise runtime.

Scope

  • JSC__JSModuleLoader__evaluate
  • JSC__JSModuleLoader__loadAndEvaluateModule
  • JSModuleLoader__import

Acceptance

  • evaluate must decode source/origin/referrer byte spans safely, register the provided module under the normalized origin, import it with the referrer, return the exact Promise value, and write only the pinned exception out channel when setup fails.
  • loadAndEvaluateModule and import must decode the pinned BunString representation without userland coercion and return rooted Promise cells from the selected realm.
  • Preserve module cache identity, dependency/link/evaluation ordering, top-level-await settlement, namespace identity, circular graphs, repeated imports, and referrer-relative resolution.
  • Syntax, resolution, link, and evaluation failures must reject the returned Promise or publish the exact synchronous exception boundary required by each entry point; no swallowed errors or duplicate evaluation.
  • Reject invalid spans, foreign handles, and mismatched realms safely; keep source, registry records, namespaces, and pending Promise jobs precisely rooted.
  • Add focused and compiled-consumer fixtures, refresh both pinned inventories, update README/API/ABI integration evidence and parent issues, and publish committed verification.

GetterSetter null probes are deliberately not bundled here: they require real GetterSetter/CustomGetterSetter cell handles and will be tracked with that representation instead of returning fabricated booleans.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions