Skip to content

Question: When to use extensions vs more services? #1516

Answered by mikea
nhynes asked this question in Q&A
Discussion options

You must be logged in to vote

@nhynes there are multiple things that might be confusing:

  • Extensions as in [1] . These provide new modules to apps (or to other internal features)
  • Wrapped Bindings as in [2]. These are used to provide new bindings with new apis different from underlying implementations (http for a service).

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.

There's not much documentation for extensions or wrapped bindings

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.

t…

Replies: 1 comment

Comment options

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

This discussion was converted from issue #1468 on January 03, 2024 04:07.