You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,14 +142,18 @@ config_file = "/a/path"
142
142
auth = { username = "open", password = "sesame" }
143
143
```
144
144
145
-
### Well-known metadata
145
+
### Metadata via Well-known URI (`/.well-known`)
146
146
147
-
For well-used or public registries, we recommend creating a well-known metadata file that is used by
147
+
For well-used or public registries, we recommend creating a [well-known metadata file](https://en.wikipedia.org/wiki/Well-known_URI) that is used by
148
148
the tool chain to simplify configuration and indicate to a client which protocols and mappings to
149
149
use (although this can be set directly in config as well). The `wkg` tool and libraries expect a
150
150
`registry.json` file to be present at a specific location to indicate to the tooling where the
151
151
components are stored. For example, if a registry was `example.com`, then the tooling will attempt
152
-
to find a `registry.json` file at `https://example.com/.well-known/wasm-pkg/registry.json`.
152
+
For well-used or public registries, we recommend creating a [`.well-known` metadata file](https://en.wikipedia.org/wiki/Well-known_URI) that is used by
153
+
the tool chain to simplify configuration and indicate to a client which protocols and mappings to
154
+
use (although this can be set directly in config as well).
155
+
156
+
The `wkg` tool and libraries expect a `registry.json` file to be present at a specific location to indicate to the tooling where the components are stored. For example, given a registry `example.com`, then the tooling will attempt to find a `registry.json` file at `https://example.com/.well-known/wasm-pkg/registry.json`.
153
157
154
158
A full example of what this `registry.json` file should look like is below:
155
159
@@ -208,6 +212,22 @@ file from the example above, then the component will be stored at
208
212
`ghcr.io/webassembly/acme/foo:0.1.0`. Please note that the tag _MUST_ be a valid semantic version or
209
213
the tooling will ignore it when pulling.
210
214
215
+
### Default fallback registries
216
+
217
+
If no configuration is found, the following mapping of namespace prefixes is used as a fallback:
218
+
```
219
+
wasi = "wasi.dev"
220
+
ba = "bytecodealliance.org"
221
+
```
222
+
The `wkg` tool will therefore fetch registry metadata from the respective [well-known URIs](https://en.wikipedia.org/wiki/Well-known_URI):
0 commit comments