florianhartung opened issue #10677:
I am storing non-
Senddata inside aStore<T>in a single-threaded synchronous environment.
Also I am using thewasmtime::component::bindgen!macro to generate bindings for my WIT definition.
Updating thewasmtimedependency from28.0.0to32.0.0introduces a compilation error because a newSendbound on the store data exists for calling guest-exported functions.I tried setting
require_store_data_send: falseandasync: falseaccording to thebindgen!documentation, however these seem to only have an impact on the trait bound of the generatedadd_to_linker_imports_get_hostfunction.Here is a minimal example for better understanding:
bindgen!({ inline: " package my:inline; world my-world { export foo: func(); } ", async: false, require_store_data_send: false, });expands to
impl MyWorld { ... pub fn call_foo<S: wasmtime::AsContextMut>( &self, mut store: S, ) -> wasmtime::Result<()> where <S as wasmtime::AsContext>::Data: Send, { ... } }Here there is a
<S as wasmtime::AsContext>::Data: Sendtrait bound, which essentially forbids the use of non-Sendstore data when calling guest-exposed functions.
This restriction did not exist inv28.0.0and I do not see a reason why it would be required now.The change was introduced in this commit in
crates/wit-bindgen/src/lib.rsline 3290 (this is the direct link, however the link does not load correctly for me atleast).My question is: Is this indeed a bug or is there is any other option I've overlooked that allows me to use non-
Sendstore data?
florianhartung commented on issue #10677:
Also I noticed that all tests in
crates/component-macro/testscover only therequire_store_data_send: truecase as of now.
florianhartung edited a comment on issue #10677:
Also I noticed that all the tests in
crates/component-macro/testscurrently only cover therequire_store_data_send: truecase.
alexcrichton closed issue #10677:
I am storing non-
Senddata inside aStore<T>in a single-threaded synchronous environment.
Also I am using thewasmtime::component::bindgen!macro to generate bindings for my WIT definition.
Updating thewasmtimedependency from28.0.0to32.0.0introduces a compilation error because a newSendbound on the store data exists for calling guest-exported functions.I tried setting
require_store_data_send: falseandasync: falseaccording to thebindgen!documentation, however these seem to only have an impact on the trait bound of the generatedadd_to_linker_imports_get_hostfunction.Here is a minimal example for better understanding:
bindgen!({ inline: " package my:inline; world my-world { export foo: func(); } ", async: false, require_store_data_send: false, });expands to
impl MyWorld { ... pub fn call_foo<S: wasmtime::AsContextMut>( &self, mut store: S, ) -> wasmtime::Result<()> where <S as wasmtime::AsContext>::Data: Send, { ... } }Here there is a
<S as wasmtime::AsContext>::Data: Sendtrait bound, which essentially forbids the use of non-Sendstore data when calling guest-exposed functions.
This restriction did not exist inv28.0.0and I do not see a reason why it would be required now.The change was introduced in this commit in
crates/wit-bindgen/src/lib.rsline 3290 (this is the direct link, however the link does not load correctly for me atleast).My question is: Is this indeed a bug or is there is any other option I've overlooked that allows me to use non-
Sendstore data?
alexcrichton commented on issue #10677:
Thanks for the report! This was an accidental regression that wasn't intended. Should be fixed in https://github.com/bytecodealliance/wasmtime/pull/10685
alexcrichton reopened issue #10677:
I am storing non-
Senddata inside aStore<T>in a single-threaded synchronous environment.
Also I am using thewasmtime::component::bindgen!macro to generate bindings for my WIT definition.
Updating thewasmtimedependency from28.0.0to32.0.0introduces a compilation error because a newSendbound on the store data exists for calling guest-exported functions.I tried setting
require_store_data_send: falseandasync: falseaccording to thebindgen!documentation, however these seem to only have an impact on the trait bound of the generatedadd_to_linker_imports_get_hostfunction.Here is a minimal example for better understanding:
bindgen!({ inline: " package my:inline; world my-world { export foo: func(); } ", async: false, require_store_data_send: false, });expands to
impl MyWorld { ... pub fn call_foo<S: wasmtime::AsContextMut>( &self, mut store: S, ) -> wasmtime::Result<()> where <S as wasmtime::AsContext>::Data: Send, { ... } }Here there is a
<S as wasmtime::AsContext>::Data: Sendtrait bound, which essentially forbids the use of non-Sendstore data when calling guest-exposed functions.
This restriction did not exist inv28.0.0and I do not see a reason why it would be required now.The change was introduced in this commit in
crates/wit-bindgen/src/lib.rsline 3290 (this is the direct link, however the link does not load correctly for me atleast).My question is: Is this indeed a bug or is there is any other option I've overlooked that allows me to use non-
Sendstore data?
alexcrichton commented on issue #10677:
er, didn't mean to close, wrong button.
alexcrichton closed issue #10677:
I am storing non-
Senddata inside aStore<T>in a single-threaded synchronous environment.
Also I am using thewasmtime::component::bindgen!macro to generate bindings for my WIT definition.
Updating thewasmtimedependency from28.0.0to32.0.0introduces a compilation error because a newSendbound on the store data exists for calling guest-exported functions.I tried setting
require_store_data_send: falseandasync: falseaccording to thebindgen!documentation, however these seem to only have an impact on the trait bound of the generatedadd_to_linker_imports_get_hostfunction.Here is a minimal example for better understanding:
bindgen!({ inline: " package my:inline; world my-world { export foo: func(); } ", async: false, require_store_data_send: false, });expands to
impl MyWorld { ... pub fn call_foo<S: wasmtime::AsContextMut>( &self, mut store: S, ) -> wasmtime::Result<()> where <S as wasmtime::AsContext>::Data: Send, { ... } }Here there is a
<S as wasmtime::AsContext>::Data: Sendtrait bound, which essentially forbids the use of non-Sendstore data when calling guest-exposed functions.
This restriction did not exist inv28.0.0and I do not see a reason why it would be required now.The change was introduced in this commit in
crates/wit-bindgen/src/lib.rsline 3290 (this is the direct link, however the link does not load correctly for me atleast).My question is: Is this indeed a bug or is there is any other option I've overlooked that allows me to use non-
Sendstore data?
Last updated: Dec 06 2025 at 06:05 UTC