Skip to content

Commit

Permalink
fix: link wasi:logging
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 20, 2024
1 parent 999d0f5 commit 56d83c1
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "west"
version = "0.1.2"
version = "0.1.3"
description = "WebAssembly component test runtime"

authors.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions bindings/wasi/logging/imports/imports.wit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bindings/wasi/logging/logging/empty.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file exists for testing this package without WebAssembly,
// allowing empty function bodies with a //go:wasmimport directive.
// See https://pkg.go.dev/cmd/compile for more information.
86 changes: 86 additions & 0 deletions bindings/wasi/logging/logging/logging.wit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "west-sys"
version = "0.1.2"
version = "0.1.3"
description = "WebAssembly component test runtime C bindings"

authors.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ pub fn instantiate(Config { engine, wasm }: Config) -> anyhow::Result<Instance>
wasmtime_wasi::add_to_linker_sync(&mut linker).context("failed to link WASI")?;
wasmtime_wasi_http::add_only_http_to_linker_sync(&mut linker)
.context("failed to link `wasi:http`")?;
bindings::wasiext::http::ext::add_to_linker(&mut linker, |cx| cx)?;
bindings::wasiext::http::ext::add_to_linker(&mut linker, |cx| cx)
.context("failed to link `wasiext:http/ext`")?;
bindings::wasi::logging::logging::add_to_linker(&mut linker, |cx| cx)
.context("failed to link `wasi:logging/logging`")?;

let wasi = WasiCtxBuilder::new()
.inherit_env()
Expand Down

0 comments on commit 56d83c1

Please sign in to comment.