searchSDK for Rust
Rust / Cargo 1.98+. 14 normalized web-search adapters and 493 retained native bindings across 13 providers; gateway client.
On this page
Install from source
Package: searchsdk, version 0.1.0-alpha.1. This is an alpha source/local-artifact installation. No public registry release or release tag is assumed.
git clone https://github.com/Belweave/searchSDK.git
cd searchSDK
# Record this revision with your application's dependency lock.
git rev-parse HEAD[dependencies]
searchsdk = { path = "/absolute/path/searchSDK/packages/rust" }
tokio = { version = "=1.53.1", features = ["rt", "macros"] }Add these entries to your application's Cargo.toml. This uses the source checkout, not a crates.io release. The SDK uses Tokio, Reqwest with rustls, and Serde; retain Cargo.lock.
Make a server-side search
Set provider keys in your application's server environment or secret store. The example below makes a real provider request when invoked and can incur charges. Use the package's fixture consumer for a key-free check.
use searchsdk::{Provider, ProviderId, SearchClient, SearchRequest, CallOptions};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let key = std::env::var("EXA_API_KEY")?;
let search = SearchClient::new(Provider::new(ProviderId::Exa, key)?)?;
let response = search.search(
SearchRequest::new("SQLite write concurrency"),
CallOptions::default(),
).await?;
for result in response.results {
println!("{}", result.url);
}
Ok(())
}Set EXA_API_KEY on the server, then cargo run. This request uses the default result limit of five; no network request runs during compilation.
Supported surface and limits
14 normalized web-search adapters and 493 retained native bindings across 13 providers; gateway client.
- Native schema models preserve provider fields but are not an exhaustive runtime JSON Schema validator.
- Keep provider execution on servers; a Cargo build does not establish mobile, browser or WebAssembly support.
Preserve result order, provider-native scores and source provenance. Unknown usage is not zero cost. Cancellation and deadlines cannot undo a request already accepted by a remote system or guarantee exactly-once effects.
Verify without provider keys
cargo test --manifest-path packages/rust/Cargo.toml --locked -j 2
cargo clippy --manifest-path packages/rust/Cargo.toml --locked -j 2 -- -D warnings
cargo package --manifest-path packages/rust/Cargo.toml --locked534 tests, formatting, Clippy, Cargo packaging and a consumer built from the extracted crate.
These are deterministic contract and artifact checks. They do not establish live-provider or account-entitlement verification. Read the package README for precise commands, dependencies and runtime coverage.