workerd icon indicating copy to clipboard operation
workerd copied to clipboard

[R2] multipart bindings

Open Frederik-Baetens opened this issue 3 years ago • 5 comments
trafficstars

~~Still need to check if I need to implement gcvisitor on the MultipartUpload object, since it contains a jsg::Ref.~~

Frederik-Baetens avatar Oct 11 '22 20:10 Frederik-Baetens

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.

jasnell avatar Oct 11 '22 21:10 jasnell

I think I've adressed all feedback now, I'll squash the commits once all reviewing is done.

Frederik-Baetens avatar Oct 12 '22 22:10 Frederik-Baetens

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 avatar Oct 14 '22 18:10 Warfields

@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

Frederik-Baetens avatar Oct 14 '22 19:10 Frederik-Baetens

Sounds Good @Frederik-Baetens

Warfields avatar Oct 14 '22 20:10 Warfields

Closing because I lost permissions to update this branch

Frederik-Baetens avatar Nov 03 '22 23:11 Frederik-Baetens