Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jasnell
Copy link
Collaborator

@jasnell jasnell commented Sep 12, 2025

Moves the capnp module implementation out from the internal project to workerd.

This is part of the new module registry consolidation effort.

No changes were made to the api/capnp.h and api/capnp.c++ files other than changing the namespace name. Those were duplicated directly from the internal project

this builds on #5065 which must land first

@guybedford
Copy link
Contributor

guybedford commented Sep 13, 2025

It would be good to understand the motivations and background here further. What is the maintenance approach being taken - to allow divergence? Is there a sync process? Or are there plans to evolve this further as well?

@kentonv kentonv self-requested a review September 13, 2025 18:05
@kentonv
Copy link
Member

kentonv commented Sep 13, 2025

Given it declares a custom TypeWrapper, one could argue this belongs under JSG rather than API.

@jasnell
Copy link
Collaborator Author

jasnell commented Sep 14, 2025

@guybedford:

It would be good to understand the motivations and background here further. What is the maintenance approach being taken - to allow divergence? Is there a sync process? Or are there plans to evolve this further as well?

The goal here is to work towards consolidating as much of the module registry implementation as possible within workerd. Right now, between workerd and the internal project we end up with a fair amount of duplicated code, as part of the new module registry work, I'm working towards consolidating that. There is no sync process, this is being moved from internal to workerd, it's not going to exist in both places.

@kentonv:

Given it declares a custom TypeWrapper, one could argue this belongs under JSG rather than API.

Yeah, I was considering that also.

...Actually, tho, I think for now keeping it in api is appropriate. The implementation has a dependency on the IoContext in several places and nothing in jsg is IoContext aware.

@jasnell jasnell force-pushed the jasnell/new-module-registry-refine-schemaloader-ownership branch from 8e60da4 to aea252f Compare September 15, 2025 15:03
Base automatically changed from jasnell/new-module-registry-refine-schemaloader-ownership to main September 15, 2025 15:57
@jasnell jasnell force-pushed the jasnell/move-capnp-module-to-workerd branch from 1798d0b to d735f22 Compare September 15, 2025 16:21
@jasnell jasnell requested a review from kentonv September 15, 2025 22:46
@jasnell jasnell force-pushed the jasnell/move-capnp-module-to-workerd branch from f6ac855 to f558392 Compare September 16, 2025 19:55
@jasnell jasnell merged commit 062206f into main Sep 16, 2025
32 of 34 checks passed
@jasnell jasnell deleted the jasnell/move-capnp-module-to-workerd branch September 16, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants