Skip to content

Add support for the wasm32-unknown-unknown target#38

Open
YouKnow-sys wants to merge 3 commits into
teloxide:masterfrom
YouKnow-sys:master
Open

Add support for the wasm32-unknown-unknown target#38
YouKnow-sys wants to merge 3 commits into
teloxide:masterfrom
YouKnow-sys:master

Conversation

@YouKnow-sys

Copy link
Copy Markdown
Contributor

Introduces MaybeSend/MaybeSync traits and a conditional BoxFuture alias so handler and future bounds relax to nothing on wasm32-unknown-unknown while remaining identical to Send/Sync on native targets.

This lets !Send futures flow through handlers on wasm32 without any unsafe.

`MaybeSend`/`MaybeSync` traits and a conditional `BoxFuture` alias
@hirrolot
hirrolot self-requested a review July 18, 2026 22:19
Comment thread src/handler/core.rs Outdated
Comment thread examples/diagnostics.rs
@YouKnow-sys

Copy link
Copy Markdown
Contributor Author

I went ahead and wrote a simple macro named cross_test to simplify tests, adding another dependency for this simple change was unnecessary

@YouKnow-sys
YouKnow-sys requested a review from hirrolot July 22, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants