-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling for wasm32-unknown-unknown fails inside event-listener-strategy #50
Comments
Seems like bumping the dependencies fixes the issue, see #51 for a suggested fix (disclaimer: I have no idea what I'm doing, I just fiddled until things built and checked that the added |
in version 0.7.0, seems have the familiar issue, even though event-listener is 5.0 and event-listener-strategy is 0.5. error[E0599]: no method named `wait` found for struct `SendInner` in the current scope
--> /Users/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-broadcast-0.7.0/src/lib.rs:1595:1
|
1595 | / easy_wrapper! {
1596 | | /// A future returned by [`Sender::broadcast()`].
1597 | | #[derive(Debug)]
1598 | | #[must_use = "futures do nothing unless .awaited"]
1599 | | pub struct Send<'a, T: Clone>(SendInner<'a, T> => Result<Option<T>, SendError<T>>);
1600 | | pub(crate) wait();
1601 | | }
| |_^ method not found in `SendInner<'_, T>`
1602 |
1603 | / pin_project! {
1604 | | #[derive(Debug)]
1605 | | struct SendInner<'a, T> {
1606 | | sender: &'a Sender<T>,
... |
1613 | | }
1614 | | }
| |_- method `wait` not found for this struct
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `wait`, perhaps you need to implement it:
candidate #1: `Strategy`
= note: this error originates in the macro `easy_wrapper` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no method named `wait` found for struct `RecvInner` in the current scope
--> /Users/xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-broadcast-0.7.0/src/lib.rs:1667:1
|
1667 | / easy_wrapper! {
1668 | | /// A future returned by [`Receiver::recv()`].
1669 | | #[derive(Debug)]
1670 | | #[must_use = "futures do nothing unless .awaited"]
1671 | | pub struct Recv<'a, T: Clone>(RecvInner<'a, T> => Result<T, RecvError>);
1672 | | pub(crate) wait();
1673 | | }
| |_^ method not found in `RecvInner<'_, T>`
1674 |
1675 | / pin_project! {
1676 | | #[derive(Debug)]
1677 | | struct RecvInner<'a, T> {
1678 | | receiver: &'a mut Receiver<T>,
... |
1684 | | }
1685 | | }
| |_- method `wait` not found for this struct
` |
Is this still valid with the latest release? |
Here is the code. https://github.com/lf-wxp/rust-practice/tree/main/yew-await
|
Fixes #50 I dont really know if this is correct since I didnt dig too deep into the issue but it does compile and work for me
The error message looks like:
I'm currently looking for a workaround, because event-listener definitely seems to support wasm32-unknown-unknown. But currently my only idea, aka
default_features = false, features = ["portable-atomic"]
is without any success.My current status is this crate, initialized with
cargo init --bin
and with only theCargo.toml
modified this way, built withcargo build --target=wasm32-unknown-unknown
:I have also tried with the latest rust nightly without success, to make it less likely it's a bug in the specific nightly I had pinned.
Incidentally, it looks like event-listener released a v4 and event-listener-strategy released a v0.4, it might be worth updating async-broadcast?
I'm open to any ideas, and will continue searching on my side :)
The text was updated successfully, but these errors were encountered: