Skip to content

Commit 6df7262

Browse files
Merge pull request #2854 from karthik2804/http_source_cdeps
allow satisfying component dependencies via http source
2 parents 1250749 + 9b4f1d6 commit 6df7262

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/loader/src/local.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,14 @@ impl LocalLoader {
313313
let content = file_content_ref(self.app_root.join(path))?;
314314
(content, export)
315315
}
316+
v2::ComponentDependency::HTTP {
317+
url,
318+
digest,
319+
export,
320+
} => {
321+
let content = self.load_http_source(&url, &digest).await?;
322+
(content, export)
323+
}
316324
};
317325

318326
Ok(LockedComponentDependency {

crates/manifest/src/schema/v2.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ pub enum ComponentDependency {
135135
/// Optional export name
136136
export: Option<String>,
137137
},
138+
/// `... = { url = "https://example.com/component.wasm", sha256 = "..." }`
139+
HTTP {
140+
/// URL to Wasm
141+
url: String,
142+
/// SHA256 Checksum of the component. The string should start with 'sha256:'
143+
digest: String,
144+
/// Optional export name
145+
export: Option<String>,
146+
},
138147
}
139148

140149
/// Component definition

0 commit comments

Comments
 (0)