# Preface

The **CESS Rust SDK** enables developers to interact directly with the **CESS decentralized storage network**, offering APIs for querying blockchain data, performing transactions, managing user storage, and facilitating file operations.

This document serves as a starting point for setting up and using the SDK in your Rust environment.

***

## 1. Overview

With the Rust SDK, developers can:

* Connect to the CESS blockchain via remote nodes or custom endpoints.
* Execute signed transactions using mnemonics or key pairs.
* Query on-chain data such as territories, file storage information, and OSS (Object Storage Service) configurations.
* Build custom gateways and retrieval logic for decentralized file operations.

The SDK follows a modular architecture:

* **Chain Modules**: Contain blockchain-related logic divided into pallets such as `audit`, `balances`, `file_bank`, `oss` and `storage_handler`.
* **Gateway Module**: Provides network interfacing utilities and file transfer operations.
* **Retriever Module**: Handles file fetching, buffering, and disk operations.

Each module includes **query APIs** (read-only access) and **transaction APIs** (state-changing calls).

***

## 2. Installation

To use the CESS Rust SDK in your project, add the following dependency to your `Cargo.toml`:

```toml
[dependencies]
cess-rust-sdk = { git = "http://github.com/CESSProject/cess-rust-sdk.git", branch = "v0.8.0-premainnet" }
```

This pulls the latest version of the SDK directly from the official GitHub repository’s v0.8.0-premainnet branch.

## 3. Source Code

You can also clone the SDK repository manually:

```bash
git clone https://github.com/CESSProject/cess-rust-sdk.git
cd cess-rust-sdk
```

The SDK source includes:

* Example code for each module
* Predefined API provider implementations
* Query and transaction usage patterns for all supported pallets

## 4. Next Steps

To learn about each blockchain module and its APIs, continue to:

* [Chain Modules Overview](/developer/cess-sdk/sdk-rust/chain.md)
* [Audit Queries and Transactions](/developer/cess-sdk/sdk-rust/chain/audit.md)
* [Balances Transactions](https://github.com/CESSProject/doc-v2/blob/main/developer/cess-sdk/sdk-rust/chain/balances/README.md)
* [File Bank Queries and Transactions](/developer/cess-sdk/sdk-rust/chain/file_bank.md)
* [OSS Management](/developer/cess-sdk/sdk-rust/chain/oss.md)
* [Storage Handler Operations](/developer/cess-sdk/sdk-rust/chain/storage_handler.md)


---

# 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://doc.cess.network/developer/cess-sdk/sdk-rust/preface.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.
