feat: add OCI annotations
Fixes #301
Hey @ricochet thanks for the contribution! So the implementation looks fantastic so far -- broken tests aside (it looks like there's a small use-before-definition, probably an easy fix).
That said, I think that we might be better served by using the functionality already present in jco's build of wasm-tools (there's a bit of a co-dependent situation at play here which might be surprising.
Basically, the metadataAdd function comes from Jco's compiled version of wasm-tools, which is actually built from Rust into WebAssembly -- so if we add some options to that component, we can get a version released that does this completely from rust.
This is actually already supported (see the form of producers-fields), so I think you should be able to achieve what you wanted by just including the relevant fields in the metadataAdd call.
That should be the last argument to the metadataAdd function. With that change and an update to the tests to use the API and the CLI (an "E2E" test with package.json filled out as you'd want), I think we'd be good to go!