Skip to content

Commit

Permalink
fix the compilation of the wasm example and update the readme again
Browse files Browse the repository at this point in the history
  • Loading branch information
irevoire committed May 2, 2024
1 parent 1accb0e commit b83b8ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ The SDK lets you customize the http client by implementing the `HttpClient` trai
initializing the `Client` with the `new_with_client` method.
You may be interested by the `futures-unsend` feature which lets you specify a non-Send http client.

#### Wasm support <!-- omit in TOC -->

The SDK supports wasm through reqwest. You'll need to enable the `futures-unsend` feature while importing it, though.

## 🌐 Running in the Browser with WASM <!-- omit in TOC -->

This crate fully supports WASM.
Expand Down
2 changes: 1 addition & 1 deletion examples/web_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serde_json = "1.0"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.18"
yew = {version="0.21", features = ["csr"]}
meilisearch-sdk = {path="../.."}
meilisearch-sdk = { path="../..", features = ["futures-unsend"] }
lazy_static = "1.4"
serde = {version="1.0", features=["derive"]}
web-sys = "0.3"
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@
//! The SDK lets you customize the http client by implementing the `HttpClient` trait yourself and
//! initializing the `Client` with the `new_with_client` method.
//! You may be interested by the `futures-unsend` feature which lets you specify a non-Send http client.
//!
//! ### Wasm support <!-- omit in TOC -->
//!
//! The SDK supports wasm through reqwest. You'll need to enable the `futures-unsend` feature while importing it, though.
#![warn(clippy::all)]
#![allow(clippy::needless_doctest_main)]

Expand Down

0 comments on commit b83b8ae

Please sign in to comment.