Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

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

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ rustix = { workspace = true, features = ["mm", "process"] }

[dev-dependencies]
# depend again on wasmtime to activate its default features for tests
wasmtime = { workspace = true, features = ['default', 'winch', 'pulley', 'all-arch', 'call-hook', 'memory-protection-keys', 'component-model-async'] }
wasmtime = { workspace = true, features = ['default', 'winch', 'pulley', 'all-arch', 'call-hook', 'memory-protection-keys'] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = { workspace = true }
Expand Down Expand Up @@ -129,7 +129,6 @@ wasmtime-test-macros = { path = "crates/test-macros" }
pulley-interpreter = { workspace = true, features = ["disas"] }
wasm-encoder = { workspace = true }
cranelift-native = { workspace = true }
futures = { workspace = true }

[target.'cfg(windows)'.dev-dependencies]
windows-sys = { workspace = true, features = ["Win32_System_Memory"] }
Expand Down Expand Up @@ -324,7 +323,6 @@ io-extras = "0.18.1"
rustix = "1.0.3"
# wit-bindgen:
wit-bindgen = { version = "0.43.0", default-features = false }
wit-bindgen-rt = { version = "0.43.0", default-features = false }
wit-bindgen-rust-macro = { version = "0.43.0", default-features = false }

# wasm-tools family:
Expand All @@ -338,7 +336,6 @@ wasm-mutate = "0.235.0"
wit-parser = "0.235.0"
wit-component = "0.235.0"
wasm-wave = "0.235.0"
wasm-compose = "0.235.0"

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
Expand Down Expand Up @@ -382,7 +379,7 @@ tempfile = "3.1.0"
filecheck = "0.5.0"
libc = { version = "0.2.112", default-features = true }
file-per-thread-logger = "0.2.0"
tokio = { version = "1.43.0", features = [ "rt", "time" ] }
tokio = { version = "1.30.0", features = [ "rt", "time" ] }
hyper = "1.0.1"
http = "1.0.0"
http-body = "1.0.0"
Expand Down
3 changes: 0 additions & 3 deletions crates/c-api/src/component/val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,6 @@ impl From<&Val> for wasmtime_component_val_t {
Val::Result(x) => wasmtime_component_val_t::Result(x.into()),
Val::Flags(x) => wasmtime_component_val_t::Flags(x.as_slice().into()),
Val::Resource(_resource_any) => todo!(),
Val::Future(_) => todo!(),
Val::Stream(_) => todo!(),
Val::ErrorContext(_) => todo!(),
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions crates/component-macro/tests/expanded/char_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@ pub mod exports {
(char,),
>::new_unchecked(self.return_char)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
}
}
Expand Down
70 changes: 28 additions & 42 deletions crates/component-macro/tests/expanded/flags_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,10 @@ pub mod exports {
(Flag1,),
>::new_unchecked(self.roundtrip_flag1)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag2<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -794,12 +792,10 @@ pub mod exports {
(Flag2,),
>::new_unchecked(self.roundtrip_flag2)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag4<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -817,12 +813,10 @@ pub mod exports {
(Flag4,),
>::new_unchecked(self.roundtrip_flag4)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag8<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -840,12 +834,10 @@ pub mod exports {
(Flag8,),
>::new_unchecked(self.roundtrip_flag8)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag16<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -863,12 +855,10 @@ pub mod exports {
(Flag16,),
>::new_unchecked(self.roundtrip_flag16)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag32<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -886,12 +876,10 @@ pub mod exports {
(Flag32,),
>::new_unchecked(self.roundtrip_flag32)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
pub fn call_roundtrip_flag64<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -909,12 +897,10 @@ pub mod exports {
(Flag64,),
>::new_unchecked(self.roundtrip_flag64)
};
let future = callee
.call_concurrent(store.as_context_mut(), (arg0,));
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), (arg0,)),
|v| v.map(|(v,)| v),
)
}
}
}
Expand Down
18 changes: 8 additions & 10 deletions crates/component-macro/tests/expanded/floats_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,10 @@ pub mod exports {
(f32,),
>::new_unchecked(self.f32_result)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_f64_result<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -430,11 +429,10 @@ pub mod exports {
(f64,),
>::new_unchecked(self.f64_result)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
}
}
Expand Down
81 changes: 36 additions & 45 deletions crates/component-macro/tests/expanded/integers_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,11 +921,10 @@ pub mod exports {
(u8,),
>::new_unchecked(self.r1)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r2<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -942,11 +941,10 @@ pub mod exports {
(i8,),
>::new_unchecked(self.r2)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r3<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -963,11 +961,10 @@ pub mod exports {
(u16,),
>::new_unchecked(self.r3)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r4<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -984,11 +981,10 @@ pub mod exports {
(i16,),
>::new_unchecked(self.r4)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r5<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -1005,11 +1001,10 @@ pub mod exports {
(u32,),
>::new_unchecked(self.r5)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r6<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -1026,11 +1021,10 @@ pub mod exports {
(i32,),
>::new_unchecked(self.r6)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r7<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -1047,11 +1041,10 @@ pub mod exports {
(u64,),
>::new_unchecked(self.r7)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_r8<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -1068,11 +1061,10 @@ pub mod exports {
(i64,),
>::new_unchecked(self.r8)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
pub fn call_pair_ret<S: wasmtime::AsContextMut>(
&self,
Expand All @@ -1089,11 +1081,10 @@ pub mod exports {
((i64, u8),),
>::new_unchecked(self.pair_ret)
};
let future = callee.call_concurrent(store.as_context_mut(), ());
async move {
let (ret0,) = future.await?;
Ok(ret0)
}
wasmtime::component::__internal::FutureExt::map(
callee.call_concurrent(store.as_context_mut(), ()),
|v| v.map(|(v,)| v),
)
}
}
}
Expand Down
Loading