⚡ The Meilisearch API client written for Rust 🦀
**Meilisearch Rust** is the Meilisearch API client for Rust developers. **Meilisearch** is an open-source search engine. [Learn more about Meilisearch.](https://github.com/meilisearch/meilisearch) ## Table of Contents - [📖 Documentation](#-documentation) - [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience) - [🔧 Installation](#-installation) - [🚀 Getting started](#-getting-started) - [🌐 Running in the Browser with WASM](#-running-in-the-browser-with-wasm) - [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch) - [⚙️ Contributing](#️-contributing) ## 📖 Documentation This readme contains all the documentation you need to start using this Meilisearch SDK. For general information on how to use Meilisearch—such as our API reference, tutorials, guides, and in-depth articles—refer to our [main documentation website](https://www.meilisearch.com/docs). ## ⚡ Supercharge your Meilisearch experience Say goodbye to server deployment and manual updates with [Meilisearch Cloud](https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=github&utm_medium=meilisearch-rust). Get started with a 14-day free trial! No credit card required. ## 🔧 Installation To use `meilisearch-sdk`, add this to your `Cargo.toml`: ```toml [dependencies] meilisearch-sdk = "0.27.1" ``` The following optional dependencies may also be useful: ```toml futures = "0.3" # To be able to block on async functions if you are not using an async runtime serde = { version = "1.0", features = ["derive"] } ``` This crate is `async` but you can choose to use an async runtime like [tokio](https://crates.io/crates/tokio) or just [block on futures](https://docs.rs/futures/latest/futures/executor/fn.block_on.html). You can enable the `sync` feature to make most structs `Sync`. It may be a bit slower. Using this crate is possible without [serde](https://crates.io/crates/serde), but a lot of features require serde. ### Run a Meilisearch Instance This crate requires a Meilisearch server to run. There are many easy ways to [download and run a Meilisearch instance](https://www.meilisearch.com/docs/learn/getting_started/installation). For example,using the `curl` command in [your Terminal](https://itconnect.uw.edu/learn/workshops/online-tutorials/web-publishing/what-is-a-terminal/): ```bash # Install Meilisearch curl -L https://install.meilisearch.com | sh # Launch Meilisearch ./meilisearch --master-key=masterKey ``` NB: you can also download Meilisearch from **Homebrew** or **APT**. {{readme}} ## 🌐 Running in the Browser with WASM This crate fully supports WASM. The only difference between the WASM and the native version is that the native version has one more variant (`Error::Http`) in the Error enum. That should not matter so much but we could add this variant in WASM too. However, making a program intended to run in a web browser requires a **very** different design than a CLI program. To see an example of a simple Rust web app using Meilisearch, see the [our demo](./examples/web_app). WARNING: `meilisearch-sdk` will panic if no Window is available (ex: Web extension). ## 🤖 Compatibility with Meilisearch This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-rust/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info. ## ⚙️ Contributing Any new contribution is more than welcome in this project! If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!