Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
msrv_range:
description: 'Versions later-than-latest-Rust the MSRV supports'
required: false
default: '2'
default: '1'

runs:
using: composite
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ authors = ["The Wasmtime Project Developers"]
edition = "2021"
# Wasmtime's current policy is that this number can be no larger than the
# current stable release of Rust minus 2.
rust-version = "1.84.0"
rust-version = "1.85.0"

[workspace.lints.rust]
# Turn on some lints which are otherwise allow-by-default in rustc.
Expand Down
2 changes: 1 addition & 1 deletion benches/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ fn wasm_to_host(c: &mut Criterion) {
return;
}

let mut typed = Linker::new(&engine);
let mut typed = Linker::<()>::new(&engine);
typed
.func_wrap_async("", "nop", |caller, _: ()| {
Box::new(async {
Expand Down
14 changes: 8 additions & 6 deletions ci/build-test-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ const FULL_MATRIX = [
"name": "Test Windows MSVC x86_64",
"filter": "windows-x64",
},
{
"os": windows,
"target": "x86_64-pc-windows-gnu",
"name": "Test Windows MinGW x86_64",
"filter": "mingw-x64"
},
// FIXME: As of this writing, some of the GitHub images have a broken MinGW,
// leading CI to fail nondeterministically.
// {
// "os": windows,
// "target": "x86_64-pc-windows-gnu",
// "name": "Test Windows MinGW x86_64",
// "filter": "mingw-x64"
// },
{
"os": ubuntu + '-arm',
"target": "aarch64-unknown-linux-gnu",
Expand Down
12 changes: 6 additions & 6 deletions crates/component-macro/tests/expanded/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/// has been created through a [`Linker`](wasmtime::component::Linker).
///
/// For more information see [`TheWorld`] as well.
pub struct TheWorldPre<T> {
pub struct TheWorldPre<T: 'static> {
instance_pre: wasmtime::component::InstancePre<T>,
indices: TheWorldIndices,
}
impl<T> Clone for TheWorldPre<T> {
impl<T: 'static> Clone for TheWorldPre<T> {
fn clone(&self) -> Self {
Self {
instance_pre: self.instance_pre.clone(),
indices: self.indices.clone(),
}
}
}
impl<_T> TheWorldPre<_T> {
impl<_T: 'static> TheWorldPre<_T> {
/// Creates a new copy of `TheWorldPre` bindings which can then
/// be used to instantiate into a particular store.
///
Expand Down Expand Up @@ -127,7 +127,7 @@ const _: () = {
impl TheWorld {
/// Convenience wrapper around [`TheWorldPre::new`] and
/// [`TheWorldPre::instantiate`].
pub fn instantiate<_T>(
pub fn instantiate<_T: 'static>(
store: impl wasmtime::AsContextMut<Data = _T>,
component: &wasmtime::component::Component,
linker: &wasmtime::component::Linker<_T>,
Expand Down Expand Up @@ -300,7 +300,7 @@ pub mod exports {
arg0: char,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -318,7 +318,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<char>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand Down
12 changes: 6 additions & 6 deletions crates/component-macro/tests/expanded/char_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/// has been created through a [`Linker`](wasmtime::component::Linker).
///
/// For more information see [`TheWorld`] as well.
pub struct TheWorldPre<T> {
pub struct TheWorldPre<T: 'static> {
instance_pre: wasmtime::component::InstancePre<T>,
indices: TheWorldIndices,
}
impl<T> Clone for TheWorldPre<T> {
impl<T: 'static> Clone for TheWorldPre<T> {
fn clone(&self) -> Self {
Self {
instance_pre: self.instance_pre.clone(),
indices: self.indices.clone(),
}
}
}
impl<_T> TheWorldPre<_T> {
impl<_T: 'static> TheWorldPre<_T> {
/// Creates a new copy of `TheWorldPre` bindings which can then
/// be used to instantiate into a particular store.
///
Expand Down Expand Up @@ -130,7 +130,7 @@ const _: () = {
impl TheWorld {
/// Convenience wrapper around [`TheWorldPre::new`] and
/// [`TheWorldPre::instantiate_async`].
pub async fn instantiate_async<_T>(
pub async fn instantiate_async<_T: 'static>(
store: impl wasmtime::AsContextMut<Data = _T>,
component: &wasmtime::component::Component,
linker: &wasmtime::component::Linker<_T>,
Expand Down Expand Up @@ -311,7 +311,7 @@ pub mod exports {
arg0: char,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -331,7 +331,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<char>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand Down
12 changes: 6 additions & 6 deletions crates/component-macro/tests/expanded/char_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/// has been created through a [`Linker`](wasmtime::component::Linker).
///
/// For more information see [`TheWorld`] as well.
pub struct TheWorldPre<T> {
pub struct TheWorldPre<T: 'static> {
instance_pre: wasmtime::component::InstancePre<T>,
indices: TheWorldIndices,
}
impl<T> Clone for TheWorldPre<T> {
impl<T: 'static> Clone for TheWorldPre<T> {
fn clone(&self) -> Self {
Self {
instance_pre: self.instance_pre.clone(),
indices: self.indices.clone(),
}
}
}
impl<_T> TheWorldPre<_T> {
impl<_T: 'static> TheWorldPre<_T> {
/// Creates a new copy of `TheWorldPre` bindings which can then
/// be used to instantiate into a particular store.
///
Expand Down Expand Up @@ -130,7 +130,7 @@ const _: () = {
impl TheWorld {
/// Convenience wrapper around [`TheWorldPre::new`] and
/// [`TheWorldPre::instantiate_async`].
pub async fn instantiate_async<_T>(
pub async fn instantiate_async<_T: 'static>(
store: impl wasmtime::AsContextMut<Data = _T>,
component: &wasmtime::component::Component,
linker: &wasmtime::component::Linker<_T>,
Expand Down Expand Up @@ -316,7 +316,7 @@ pub mod exports {
Output = wasmtime::Result<()>,
> + Send + 'static + use<S>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -334,7 +334,7 @@ pub mod exports {
Output = wasmtime::Result<char>,
> + Send + 'static + use<S>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand Down
12 changes: 6 additions & 6 deletions crates/component-macro/tests/expanded/char_tracing_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/// has been created through a [`Linker`](wasmtime::component::Linker).
///
/// For more information see [`TheWorld`] as well.
pub struct TheWorldPre<T> {
pub struct TheWorldPre<T: 'static> {
instance_pre: wasmtime::component::InstancePre<T>,
indices: TheWorldIndices,
}
impl<T> Clone for TheWorldPre<T> {
impl<T: 'static> Clone for TheWorldPre<T> {
fn clone(&self) -> Self {
Self {
instance_pre: self.instance_pre.clone(),
indices: self.indices.clone(),
}
}
}
impl<_T> TheWorldPre<_T> {
impl<_T: 'static> TheWorldPre<_T> {
/// Creates a new copy of `TheWorldPre` bindings which can then
/// be used to instantiate into a particular store.
///
Expand Down Expand Up @@ -130,7 +130,7 @@ const _: () = {
impl TheWorld {
/// Convenience wrapper around [`TheWorldPre::new`] and
/// [`TheWorldPre::instantiate_async`].
pub async fn instantiate_async<_T>(
pub async fn instantiate_async<_T: 'static>(
store: impl wasmtime::AsContextMut<Data = _T>,
component: &wasmtime::component::Component,
linker: &wasmtime::component::Linker<_T>,
Expand Down Expand Up @@ -340,7 +340,7 @@ pub mod exports {
arg0: char,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
use tracing::Instrument;
let span = tracing::span!(
Expand Down Expand Up @@ -369,7 +369,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<char>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
use tracing::Instrument;
let span = tracing::span!(
Expand Down
32 changes: 16 additions & 16 deletions crates/component-macro/tests/expanded/conventions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
/// has been created through a [`Linker`](wasmtime::component::Linker).
///
/// For more information see [`TheWorld`] as well.
pub struct TheWorldPre<T> {
pub struct TheWorldPre<T: 'static> {
instance_pre: wasmtime::component::InstancePre<T>,
indices: TheWorldIndices,
}
impl<T> Clone for TheWorldPre<T> {
impl<T: 'static> Clone for TheWorldPre<T> {
fn clone(&self) -> Self {
Self {
instance_pre: self.instance_pre.clone(),
indices: self.indices.clone(),
}
}
}
impl<_T> TheWorldPre<_T> {
impl<_T: 'static> TheWorldPre<_T> {
/// Creates a new copy of `TheWorldPre` bindings which can then
/// be used to instantiate into a particular store.
///
Expand Down Expand Up @@ -129,7 +129,7 @@ const _: () = {
impl TheWorld {
/// Convenience wrapper around [`TheWorldPre::new`] and
/// [`TheWorldPre::instantiate`].
pub fn instantiate<_T>(
pub fn instantiate<_T: 'static>(
store: impl wasmtime::AsContextMut<Data = _T>,
component: &wasmtime::component::Component,
linker: &wasmtime::component::Linker<_T>,
Expand Down Expand Up @@ -592,7 +592,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -610,7 +610,7 @@ pub mod exports {
arg0: LudicrousSpeed,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -627,7 +627,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -643,7 +643,7 @@ pub mod exports {
S: wasmtime::AsContextMut,
>(&self, mut store: S) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -660,7 +660,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -677,7 +677,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -694,7 +694,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -711,7 +711,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -733,7 +733,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -750,7 +750,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -767,7 +767,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand All @@ -785,7 +785,7 @@ pub mod exports {
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
<S as wasmtime::AsContext>::Data: Send + 'static,
{
let callee = unsafe {
wasmtime::component::TypedFunc::<
Expand Down
Loading