Release to OCI registry - #2587
Conversation
alexcrichton
left a comment
There was a problem hiding this comment.
Thanks! If you don't mind though I'd like to get some mroe background on this and ask some questions as well. I'm not familiar what's being added here myself, and I've for example never used oras, cosign, or OCI artifacts with wkg much which may explain a bit if these questions seem ignorant.
- Could you expand a bit more on the motivation here? This looks like it's publishing
wasm-tools.wasm, and you say for use withinwkg, but could you expand on that? For example is the intention to dowkg install some:thing/wasm-toolsor something like that? - This is publishing the
wasm32-wasip1binary, where for something withwkg/registries/etc I'd expect a component to be published rather than a core module. Is it intentional thatwasm32-wasip1is used? This touches on my previous question -- I'm not sure of the use case here so I'm not sure what the intention is. - Currently this repo disallows all third-party github actions unless they're allow-listed, so as-is this won't pass CI because
oras-project/setup-orasandsigstore/cosign-installeraren't allowed actions. I can add them, but is it possible to do what you're doing here with bulit-in tools like theghCLI perhaps?
|
Thanks for getting back, happy to have this conversation now to validate (or not) my plan before I streamline inlay. The bigger problem: Consuming wasm payloads doesn't have a standard. Or rather, consuming wasm as a final user is fine when it ships inside the host package (npm, jars, etc.), but consuming wasm as an intermediate artifact seems mostly left as an exercise for the reader. We do it a lot across multiple projects, and I've ended up with a variety of mechanisms depending on the circumstances:
All of those have downsides: they clutter git history, make reproducibility harder, and don't integrate with version control tooling (e.g. dependabot won't work). The worst part is that having a different approach per project is starting to cause friction. I looked around for alternatives and the most promising and mature approach seems to be what they're doing at Microsoft and wasmCloud (for example), which is using OCI Artifacts. Using OCI artifacts has a number of benefits:
This is where my effort on inlay started. In endive we are not yet ready for components, but I thought I could use the same distribution mechanism without requiring the CM parts of the tooling. I took This mechanism has the advantage that it can be applied in all of my repositories consuming wasm, overcoming the shortcomings of the bespoke solutions mentioned above. Regarding Regarding I hope I've answered all the questions. Maybe we can try to tag |
|
Ok that all sounds reasonable enough, yeah. I'll admit I'm a bit murky on the vision here insofar as it sounds like "push things to OCI and hope everything settles around that", but the cost here in this repo isn't really much and it's just a bit of CI configuration. Another question, though, it looks like this is going to publish Additionally, do you know how the wasip1->wasip2/3 transition will work in the future? The name here doesn't have target information or anything like that. Is this something where we'd assemble an OCI artifact with both the core wasm and component? Or would the releases just switch to being a component one day? |
|
I'll give a full answer and follow up early next week. Meanwhile I'd like to react to this:
I don't disagree, at the same time I don't know if I have any better option as of today. |
|
Oh sure yeah, and to be clear I'm not opposed to this nor do I have a better idea. I mostly want to ideally make sure this repo isn't boxed into a corner where it can't do anything else by accident. If there's a natural way to evolve this that's totally fine |
This should enable tools such as
wkgto consumewasm-tools.I've only been exploring this area for a few days, so please point out anything I may have overlooked.