Skip to content

docs: refine the ctx.exports hook (Rust globals + resolve_entrypoint) - #13

Open
airyland wants to merge 1 commit into
vrtfrom
docs/ctx-exports-cache-hook
Open

airyland wants to merge 1 commit into
vrtfrom
docs/ctx-exports-cache-hook

Conversation

@airyland

Copy link
Copy Markdown

Correction after tracing the runtime: ctxExports is created in worker-factory.c++ but filled by worker_set_ctx_exports from the Rust-provided spec.globals (one LOOPBACK_SERVICE_STUB per entrypoint); the numbered channel is resolved by the Rust server's resolve_entrypoint.

So the cache-aware wrapper belongs at the channel/global construction (Rust), not on the v8 object. The doc now says that, and the next code slice is a cache-aware IoChannel/WorkerInterface around the configured entrypoint's channel.

The ctxExports object is filled by worker_set_ctx_exports from the
Rust-provided globals; the loopback channel is resolved by the Rust
resolve_entrypoint. The cache-aware channel wrapper belongs there, not
on the v8 object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant