Skip to content

Commit c3f1d56

Browse files
committed
some fixes
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent ce44e7f commit c3f1d56

9 files changed

Lines changed: 83 additions & 86 deletions

File tree

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
WIT_WORLD = { value = "hyperlight-world.wasm", relative = true }

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name = "hyperlight-wasm-http-example"
33
edition = "2024"
44

55
[dependencies]
6-
hyperlight-component-macro = "0.8.0"
7-
hyperlight-common = "0.8.0"
8-
hyperlight-host = { version = "0.8.0", default-features = false, features = [ "kvm", "mshv2" ] }
9-
hyperlight-wasm = "0.8.0"
6+
hyperlight-component-macro = { git="https://github.com/jprendes/hyperlight.git", rev="081053cbf8821997445f2f40c79818e14e6f3062" }
7+
hyperlight-common = { git="https://github.com/jprendes/hyperlight.git", rev="081053cbf8821997445f2f40c79818e14e6f3062" }
8+
hyperlight-host = { git="https://github.com/jprendes/hyperlight.git", rev="081053cbf8821997445f2f40c79818e14e6f3062", default-features = false, features = [ "kvm", "mshv2" ] }
9+
hyperlight-wasm = { git="https://github.com/jprendes/hyperlight-wasm.git", rev="2ac973b881939edbd7c0167d6b09055a52548680" }
1010

1111
hyper = "1.7"
1212
reqwest = { version = "0.12", features = ["stream", "gzip", "brotli", "deflate", "rustls-tls", "blocking"] }
@@ -18,4 +18,4 @@ hyper-util = { version = "0.1", features = ["full"] }
1818
getrandom = "0.3.3"
1919

2020
[features]
21-
use-macro = []
21+
use-macro = []

src/bindings.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,12 +1156,8 @@ impl<
11561156
>>::T,
11571157
>,
11581158
) -> () {
1159-
let mut rts = self.rt.lock().unwrap();
1160-
let ret = ::hyperlight_host::sandbox::Callable::call::<
1161-
::std::vec::Vec<u8>,
1162-
>(
1163-
&mut self.sb,
1164-
"r#wasi::r#http::handle",
1159+
let args = {
1160+
let mut rts = self.rt.lock().unwrap();
11651161
(
11661162
{
11671163
let i = rts.resource24.len();
@@ -1181,8 +1177,11 @@ impl<
11811177
);
11821178
alloc::vec::Vec::from(u32::to_ne_bytes(i as u32))
11831179
},
1184-
),
1185-
);
1180+
)
1181+
};
1182+
let ret = ::hyperlight_host::sandbox::Callable::call::<
1183+
::std::vec::Vec<u8>,
1184+
>(&mut self.sb, "r#wasi::r#http::handle", args);
11861185
let ::std::result::Result::Ok(ret) = ret else {
11871186
panic!("bad return from guest {:?}", ret)
11881187
};

0 commit comments

Comments
 (0)