Skip to content

v8 boundary: callbacks native→JS #622

@cs01

Description

@cs01

Native code passes a ChadScript function to pragma code. Pragma invokes it (EventEmitter, express middleware).

Ask

  • Register native fn pointer via V8 FunctionTemplate
  • JS call → C trampoline → native fn
  • Lifetime: native fn must outlive V8 hold; Boehm finalizer coordination
  • Thread-safety: single-threaded v1 is fine

Est

~1-2 weeks. Load-bearing for express/ws/EventEmitter-style libs. Not needed for pure data libs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststatus:plannedTracked, not scheduledv8-escape-hatchPragma / libnode / JSHandle marshalling work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions