# Rust SDK

## Endless Rust SDK <a href="#endless-rust-sdk" id="endless-rust-sdk"></a>

## Installing Rust SDK <a href="#installing-rust-sdk" id="installing-rust-sdk"></a>

Endless provides an official Rust SDK in the [Endless GitHub](https://github.com/endless-labs/endless-rust-sdk) repository. To use the Rust SDK, add the following dependency and patches on the git repo directly in your `Cargo.toml`, like this:

```
[dependencies]
endless-sdk = { git = "https://github.com/endless-labs/endless-rust-sdk"}

[patch.crates-io]
merlin = { git = "https://github.com/endless-labs/merlin" }
x25519-dalek = { git = "https://github.com/endless-labs/x25519-dalek", branch = "zeroize_v1" }
```

You must also create a `.cargo/config.toml` file with this content:

```
[build]
rustflags = ["--cfg", "tokio_unstable"]
```

## Using Rust SDK <a href="#using-rust-sdk" id="using-rust-sdk"></a>

See the [Developer Tutorials](https://docs.endless.link/endless/devbuild/build/tutorials) for code examples showing how to use the Rust SDK.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.endless.link/endless/devbuild/build/endless-sdks/rust-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
