workerd
workerd copied to clipboard
[R2] multipart bindings
~~Still need to check if I need to implement gcvisitor on the MultipartUpload object, since it contains a jsg::Ref.~~
Still need to check if I need to implement gcvisitor on the MultipartUpload object, since it contains a jsg::Ref.
Since it is unlikely that the R2Bucket and the MultipartUpload object will have a circular reference with each other, the gcvisitor impl would be optional. Personally I'd add it still but it shouldn't be required in this case.
I think I've adressed all feedback now, I'll squash the commits once all reviewing is done.
Real quick question, Since this is the the OSS repo do we want to have CF specific API's in here? Ping: @jasnell @Frederik-Baetens @vlovich
@Warfields that kind of question might be better suited for an internal chat channel, but if you look in the readme you can see that one of the goals of open source workerd is for it to be used "As an application server, to self-host applications designed for Cloudflare Workers."
Applications designed for Cloudflare Workers will generally make use of Cloudflare specific APIs. In order to be able to self host them, they do need to be able to use the bindings. That means that the bindings code also needs to be included here. In the future we, or the community, might provide alternative backends for the bindings to tie into, so that applications making use of the bindings can seamlessly run both on a self hosted workerd and on the Cloudflare Workers platform.
E.g. you can already use Durable Objects in workerd using an in-memory implementation: https://github.com/cloudflare/workerd/tree/main/samples/durable-objects-chat
Sounds Good @Frederik-Baetens
Closing because I lost permissions to update this branch