Skip to content

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

Merged
hirrolot merged 3 commits into
teloxide:masterfrom
YouKnow-sys:master
Aug 1, 2026
Merged

Add support for the wasm32-unknown-unknown target#38
hirrolot merged 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

@hirrolot hirrolot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hirrolot
hirrolot merged commit ad715a6 into teloxide:master Aug 1, 2026
2 checks passed
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