Note It is not possible to run Meilisearch in the browser without a server. This demo uses the Rust SDK in a browser using WASM, and communicates with a Meilisearch instance that is running on a remote server.
This example is a clone of crates.meilisearch.com, but the front-end is written in Rust! The Rust source files are compiled into WebAssembly and so can be readable by the browsers.
If you only want to check if this example compiles, you can run:
cargo buildTo build this example, you need wasm-pack.
You can install wasm-pack with this command:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | shwasm-pack build . --target=web --no-typescriptThe compiled files will be stored in the examples/web_app/pkg folder.
Theoretically, you could just open the examples/web_app/pkg/index.html file but due to browsers' security restrictions, you need a web server. For example:
python3 -m http.server 8080And then go to the http://localhost:8080/ URL in your browser.