Skip to content

Commit 191d03a

Browse files
authored
Pull adapters from crates.io (#37)
Use newly-published crates to use these adapters from upstream rather than bundling them here.
1 parent b712c2e commit 191d03a

6 files changed

Lines changed: 16 additions & 5 deletions

Cargo.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ wasmparser = "0.214.0"
3232
wat = "1.214.0"
3333
wit-component = "0.214.0"
3434
wit-parser = "0.214.0"
35+
wasi-preview1-component-adapter-provider = "23.0.1"

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,12 @@ impl App {
547547
return Ok(());
548548
}
549549

550-
let reactor_adapter = include_bytes!("wasi_snapshot_preview1.reactor.wasm");
551-
let command_adapter = include_bytes!("wasi_snapshot_preview1.command.wasm");
552-
let proxy_adapter = include_bytes!("wasi_snapshot_preview1.proxy.wasm");
550+
let reactor_adapter =
551+
wasi_preview1_component_adapter_provider::WASI_SNAPSHOT_PREVIEW1_REACTOR_ADAPTER;
552+
let command_adapter =
553+
wasi_preview1_component_adapter_provider::WASI_SNAPSHOT_PREVIEW1_COMMAND_ADAPTER;
554+
let proxy_adapter =
555+
wasi_preview1_component_adapter_provider::WASI_SNAPSHOT_PREVIEW1_PROXY_ADAPTER;
553556
let mut core_module = std::fs::read(lld_output.path())
554557
.with_context(|| format!("failed to read {linker:?} output"))?;
555558

-77.1 KB
Binary file not shown.
-27.1 KB
Binary file not shown.
-76.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)