-
According to my understanding, the following comparison is true of extensions and services used instead of extensions.
Is this all fair to say? There's not much documentation for extensions or wrapped bindings, and they're not used very often, so I wasn't able to find answers elsewhere. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@nhynes there are multiple things that might be confusing:
All of this can be definitely accomplished by user code, but the point of using extensions mechanism is late binding: it lets you update the implementation without updating applications.
Most of it is in
They are actually used under the hood in workers when you use some types of services (don't remember which). This feature was mostly designed for service providers (somebody who runs workerd) and not for application developers. Though I imagine it could be useful for some late-binding deployment scenarios too, e.g. providing different module implementation to different app instances. [1] workerd/src/workerd/server/workerd.capnp Line 873 in 9757dcb [2] workerd/src/workerd/server/workerd.capnp Line 477 in 9757dcb |
Beta Was this translation helpful? Give feedback.
@nhynes there are multiple things that might be confusing:
All of this can be definitely accomplished by user code, but the point of using extensions mechanism is late binding: it lets you update the implementation without updating applications.
Most of it is in
workerd.capnp
and in the extensions example. Will be happy to extend if you prod me in the right direction. PRs are welcome too.