Hey cats, I'm noting that we have cargo component new
options as follows:
--proxy
which uses the internal proxy adapter, which is fairly clear--registry
which seems obvious but then there's no help on what "magic string" works--target
which seems obvious but then, again, there's no help on the magic stringIf I wanted to build a wasi:http/proxy component by targeting the "proxy" world in ghcr.io/webassembly/wasi/http:0.2.0
what magic mix of strings would I use to create an instantly building version (absent the lib.rs code that implements it)?
I recall from a previous thread that this didn't work yet, and I'm hoping it does now. But if it doesn't, that's OK!!!
By default, the new underlying client stuff will default to the bytecodealliance registry, which is just a mirror of the webassembly one (trying to fix an issue so it points at wasi.dev, which redirects to ghcr.io/webassembly). So you don't need to specify a registry
. In general, if you want to point to any custom registries, I'd recommend setting it as part of the wkg config so all tooling can use it. Documentation for that config file can be found here: https://github.com/bytecodealliance/wasm-pkg-tools#configuration
are the magic strings the same for both paths? command line and config?
You don't need to set any strings in the case you're describing.
let me rephrase: if I want to use command line args to point at a specific registry, are the magic strings used identical to those in the config docs?
caveat escaping, of course....
[registry."acme.registry.com".oci]
Yeah, generally the registry is just something like myreg.registry.io
that maps to the name of registry config. Yep, what you put exactly
If it doesn't need auth, you don't even need that
ignoring the .oci or .warg part?
I'll try it all out tomorrow morning, so no biggie, just wanna understand where it is.
I love the config file, BTW
So let's say you have a registry with the prefix of acme
, then the minimum you'd need for the config is an entry under namespace_registries
:
[namespace_registries]
acme = "acme.registries.io"
If you need auth then you'd specify the section you mentioned above
Note that it isn't just a magic string. The default registry config (which can be overridden by the config file) will be fetched from https://<registry>/.well-known/wasm-pkg/registry.json
got it; read the comments incorrectly, thanks!
e.g. https://bytecodealliance.org/.well-known/wasm-pkg/registry.json
Specification for that is found here: https://github.com/bytecodealliance/wasm-pkg-tools#well-known-metadata
Lann Martin said:
Note that it isn't just a magic string. The default registry config (which can be overridden by the config file) will be fetched from
https://<registry>/.well-known/wasm-pkg/registry.json
forgive me, by "magic string" i merely mean that "arbitrary but decided form that will actually work but isn't explicitly mentioned anywhere but the code"
:-)
that it is IN the code, I get
I tried to document as best as I could, but I definitely have been staring at it too long and could have missed something obvious. So let me know if anything there is confusing
Yeah just want to clarify that you shouldn't use some arbitrary string, and in particular you definitely shouldn't use competitor.com
:smile:
Taylor Thomas said:
I tried to document as best as I could, but I definitely have been staring at it too long and could have missed something obvious. So let me know if anything there is confusing
nol no, it's there -- just comments sitting on top of code values after a few graphs get hard to parse. I'll submit a pr that breaks it up a bit, but I do love the config approach.
Lann Martin said:
Yeah just want to clarify that you shouldn't use some arbitrary string, and in particular you definitely shouldn't use
competitor.com
:smile:
note to self: definitely using competitor.com
new wkg
is the bomb. Just wanna say, pushing and pulling to ACR using full auth is working great.
thank you everyone; I hope to tout the work more!!! HT: @Taylor Thomas for taking a moment yesterday
Last updated: Nov 25 2024 at 19:03 UTC