Skip to content
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

Allow running on wasm32 targets using fetch() for http requests #200

Merged
merged 4 commits into from
Aug 27, 2024
Merged

Conversation

swallez
Copy link
Member

@swallez swallez commented Apr 11, 2022

The reqwest library has a webassembly backend that uses the fetch() function available in web browsers and node.js environments.

This PR enable the wasm32 target by adding conditional compilation where needed to allow the use of this target. In particular, all features related to SSL/TLS configuration are not available for this target since it is handle by the host webassembly runtime.

Some standalone examples are added to showcase the use of webassembly in a web browser and in a Cloudflare worker.

elasticsearch/src/lib.rs Outdated Show resolved Hide resolved
@swallez swallez merged commit bcade94 into main Aug 27, 2024
2 of 3 checks passed
@swallez swallez deleted the wasm branch August 27, 2024 16:01
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