Skip to main content
Guide
The published helix-db 3.0.0 crate provides the query DSL, request types, async HTTP client, and native graph helpers. The embedded client is not part of the crates.io release; see Embedded runtime.
The package is published as helix-db and imported as helix_db.

Install

Or add the dependency directly:
Cargo.toml

Define a query

#[query] converts typed arguments into request parameters, sets query_name to the function name, and returns Result<QueryRequest, QueryError>.

Execute

For Helix Cloud, add .with_api_key(Some("<cluster-api-key>")) and use a database-specific gateway URL: the 3.0.0 crate cannot send the X-Helix-Database-Id header a shared gateway requires. See Authentication. Request-builder options can require the writer, require a warm read, or control durability waiting.

Build without the macro

Embedded runtime

The crates.io release has no embedded feature. Depend on the repository instead, replacing any crates.io helix-db dependency:
This builds the engine from source, and its SDK is newer than 3.0.0. See Embedded database for storage, cache, and handle configuration.

Verify

With a local instance running, run the Execute example and print response. A new database returns an empty users array.

Next steps

Query tutorial

Learn the batch and traversal model.

Reading data

Select data by ID, label, or indexed property.