Skip to content

Support for extending or customising the runtime? #50

Answered by kentonv
tom-sherman asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Tom,

The code today is structured internally so that it's possible to add custom APIs and event handlers. Specifically, the full set of available APIs is controlled by the class WorkerdApiIsolate in src/workerd/server/workerd-api.{h,c++}. Essentially, if you fork the server directory, you can add new APIs here without having to fork the rest of the codebase.

HOWEVER, we do not currently make any promises about stability of internal APIs. E.g. WorkerdApiIsolate implements the Worker::ApiIsolate interface. This interface could change at any time. You will have to be ready to update your code as needed, or be willing to pin to a particular version of workerd.

We might add a more flexible …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Electroid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #40 on September 28, 2022 23:38.