-
Notifications
You must be signed in to change notification settings - Fork 335
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i love the direction of this- let's make sure it also works for the other build paths tho.
Does the other build paths generate a JSON binding? |
@xtuc - the RustWasm one does- the javascript one does not! |
Actually I don't think we generate it in the RustWasm part, see https://github.com/cloudflare/wrangler/blob/47dd18dd533817caae927c64dbf3360a2c2d5fb9/src/commands/publish/mod.rs#L198 It relies on a file on the fs. |
fb54719
to
22d40ac
Compare
22d40ac
to
565d65c
Compare
Moving this here out of chat: Ultimately, we want to provide the same KV integration experience in all project types. This means that we'll have to generate the bindings entries for those unless we ask people to configure in a metadata.json, which would be a less than ideal experience. I don't think the hard-coded, FS-accessed metadata_wasm.json is a good long-term solution. The "name" and "part" are things that should be either configured in your wrangler.toml, or following a convention. I'm inclined to put it in the toml, and have the template(s) updated accordingly, but i'm open to objections on that point. To me, this suggests that this PR is incomplete: we should generate metadata for all multipart workers. Either this PR needs to be updated to address rustwasm projects, or it needs to be followed up by a second PR that does. Both of those should be in place before landing #215. |
Closes in favor of #285 |
No description provided.