Skip to content

Commit 464214b

Browse files
committed
keep WASM_LAYER_MEDIA_TYPE the same until canonical value finalized
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
1 parent dd07144 commit 464214b

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

crates/oci/src/client.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ pub const SPIN_APPLICATION_MEDIA_TYPE: &str = "application/vnd.fermyon.spin.appl
2828
pub const DATA_MEDIATYPE: &str = "application/vnd.wasm.content.layer.v1+data";
2929
/// Media type for a layer representing a compressed archive of one or more files used by a Spin application
3030
pub const ARCHIVE_MEDIATYPE: &str = "application/vnd.wasm.content.bundle.v1.tar+gzip";
31-
// Legacy wasm layer media type used by pre-2.0 versions of Spin
32-
const WASM_LAYER_MEDIA_TYPE_LEGACY: &str = "application/vnd.wasm.content.layer.v1+wasm";
33-
34-
// TODO: use canonical types defined upstream; see https://github.com/bytecodealliance/registry/pull/146
35-
const WASM_LAYER_MEDIA_TYPE: &str = "application/vnd.bytecodealliance.wasm.component.layer.v0+wasm";
31+
// Note: this will be updated with a canonical value once defined upstream
32+
const WASM_LAYER_MEDIA_TYPE: &str = "application/vnd.wasm.content.layer.v1+wasm";
3633

3734
const CONFIG_FILE: &str = "config.json";
3835
const LATEST_TAG: &str = "latest";
@@ -326,7 +323,7 @@ impl Client {
326323
.await
327324
.with_context(|| "unable to write locked app config to cache")?;
328325
}
329-
WASM_LAYER_MEDIA_TYPE | WASM_LAYER_MEDIA_TYPE_LEGACY => {
326+
WASM_LAYER_MEDIA_TYPE => {
330327
this.cache.write_wasm(&bytes, &layer.digest).await?;
331328
}
332329
ARCHIVE_MEDIATYPE => {

0 commit comments

Comments
 (0)