Incremental engine for long horizon agents π Star if you like it!
Rust agentic-data-frameworkaiai-agentschange-data-capturecodebase-intelligencecontext-engineeringdata-engineeringdata-indexingdata-processingetlhelp-wantedindexingknowledge-graphllmlong-horizon-agentpythonragreal-timerustsemantic-search
docs(getting-started): Rust pages for getting started, SDK overview and the programming guide index (#2746)
LJ π₯₯π΄12f0d4a8a5d6
diff --git a/docs/src/content/docs/getting_started/ai_coding_agents.mdx b/docs/src/content/docs/getting_started/ai_coding_agents.mdxindex ec1a5aff..e73b9b36 100644--- a/docs/src/content/docs/getting_started/ai_coding_agents.mdx+++ b/docs/src/content/docs/getting_started/ai_coding_agents.mdx@@ -4,7 +4,39 @@ description: >Make Claude Code, Cursor, and other AI coding agents write correct CocoIndex v1code by installing the official CocoIndex skill β concepts, APIs, and patternspackaged for agent context.+rust_description: >+ The official CocoIndex agent skill covers the Python SDK only. For the Rust SDK,+ point Claude Code, Cursor, and other AI coding agents at the Rust SDK showcase+ and the Rust examples.---+<Lang only="rust">++CocoIndex ships an official agent skill for AI coding agents, but it covers the **Python SDK only**: its concepts, API reference and patterns are Python code. Installing it into a Rust project would teach your agent the Python API.++For a Rust pipeline, give your agent these references instead:++- [`rust/sdk/SHOWCASE.md`](https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/SHOWCASE.md) β a tour of the Rust SDK API: apps, functions, memoization, mounting, context, targets and connectors, each with a code sample.+- [`examples/rust/`](https://github.com/cocoindex-io/cocoindex/tree/main/examples/rust) β complete Rust pipelines (text embedding, code embedding, knowledge graphs, Kafka, and more), each with a `README.md`.+- These docs. Every page has a Markdown twin at `/docs/rust/<slug>.md`, and [`/docs/rust/llms.txt`](/docs/rust/llms.txt) lists them all.++A short note in your project's `AGENTS.md` or `CLAUDE.md` that points the agent at these files is usually enough. For example:++```md title="AGENTS.md"+This project uses the CocoIndex Rust SDK (the `cocoindex` crate).+Before writing pipeline code, read+https://github.com/cocoindex-io/cocoindex/blob/main/rust/sdk/SHOWCASE.md+and the closest example under+https://github.com/cocoindex-io/cocoindex/tree/main/examples/rust.+```++## Contributing++A Rust version of the skill is welcome. The skill lives in [`skills/cocoindex/`](https://github.com/cocoindex-io/cocoindex/tree/main/skills/cocoindex) and is versioned alongside the codebase. See the [contributing guide](../contributing/guide/) for how to get started.++</Lang>++<Lang only="python">+CocoIndex ships an official agent skill with the v1 core concepts, APIs, pipeline patterns, and connector instructions for AI coding agents.The skill lives in the [`skills/cocoindex/`](https://github.com/cocoindex-io/cocoindex/tree/main/skills/cocoindex) directory of the main repo.@@ -46,3 +78,5 @@ Once installed, your agent picks up the skill automatically when you ask it to b## ContributingThe skill is versioned alongside the codebase β when the API changes, the skill changes with it. PRs that improve clarity, add examples, or cover new connectors are welcome. See the [contributing guide](../contributing/guide/) for how to get started.++</Lang>diff --git a/docs/src/content/docs/getting_started/installation.mdx b/docs/src/content/docs/getting_started/installation.mdxindex 3cbef6e5..ea6152ff 100644--- a/docs/src/content/docs/getting_started/installation.mdx+++ b/docs/src/content/docs/getting_started/installation.mdx@@ -3,9 +3,12 @@ title: CocoIndex *installation*description: >Install CocoIndex with pip, uv, or Poetry, and check system requirements βPython 3.11 to 3.13 on macOS, Linux, or Windows.-meta:- language: Python 3.11++rust_description: >+ Add the CocoIndex Rust SDK to a Cargo project, choose its feature flags, and+ install the cocoindex CLI for Rust projects.---+<Lang only="python">+## Install Python and pipYou'll need:@@ -47,3 +50,105 @@ CocoIndex is supported on the following operating systems:- **macOS**: 10.12+ on x86_64, 11.0+ on arm64- **Linux**: x86_64 or arm64, glibc 2.28+ (e.g., Debian 10+, Ubuntu 18.10+, Fedora 29+, CentOS/RHEL 8+)- **Windows**: 10+ on x86_64++</Lang>++<Lang only="rust">++## Install Rust++Install Rust with [rustup](https://rustup.rs/). The SDK needs Rust 1.91.1 or later (edition 2024).++## Add the SDK to your crate++The `cocoindex` crate is not on crates.io yet. Depend on it from the GitHub repository:++{/* Source: rust/cli/src/init.rs (`sdk_dependency`), getting_started/rust_quickstart.mdx */}+```toml title="Cargo.toml"+[dependencies]+cocoindex = { git = "https://github.com/cocoindex-io/cocoindex" }+serde = { version = "1", features = ["derive"] }+tokio = { version = "1", features = ["full"] }+```++To work against a local checkout of the repository instead, use a path dependency on `rust/sdk/cocoindex`:++```toml title="Cargo.toml"+[dependencies]+cocoindex = { path = "../cocoindex/rust/sdk/cocoindex" }+```++The crate builds the CocoIndex engine from source, so the first build takes a few minutes.++## Feature flags++The default build has the core API: apps, functions, memoization, mounting, context, and the LocalFS source and target. Connectors and operations are behind Cargo features, so a crate builds only what it uses. Turn on the ones you need:++```toml title="Cargo.toml"+[dependencies]+cocoindex = { git = "https://github.com/cocoindex-io/cocoindex", features = [+ "postgres",+ "text",+ "fastembed",+ "fs_live",+] }+```++{/* Source: rust/sdk/cocoindex/Cargo.toml [features] */}+| Feature | What it adds |+|---|---|+| `fs_live` | Live LocalFS directory watching (`fs::DirWalker::live`) |+| `text` | Text splitting and language detection (`ops::text`) |+| `code_match` | Structural code matching over tree-sitter ASTs (`ops::code`) |+| `fastembed` | Local sentence-transformer text embeddings (`ops::sentence_transformers`) and CLIP image embeddings (`ops::image`); pulls in the ONNX runtime |+| `embed_api` | Remote embeddings and transcription over an OpenAI-compatible HTTP API (`ops::api`) |+| `chrono`, `rust_decimal` | Memoization keys for `chrono` and `rust_decimal` values; connector features turn these on as needed |+| `postgres` | PostgreSQL source and target |+| `sqlite` | SQLite target |+| `doris` | Apache Doris target |+| `surrealdb` | SurrealDB target |+| `neo4j` | Neo4j target |+| `falkordb` | FalkorDB target |+| `lancedb` | LanceDB target (the build needs `protoc`) |+| `qdrant` | Qdrant target (the build needs `protoc`) |+| `turbopuffer` | Turbopuffer target |+| `valkey` | Valkey / Redis vector-search target |+| `zvec` | Zvec target (the build downloads the prebuilt zvec C library) |+| `bigquery` | Google BigQuery target |+| `snowflake` | Snowflake target |+| `kafka` | Kafka source and target |+| `iggy` | Apache Iggy source and target |+| `amazon_s3` | Amazon S3 (and S3-compatible) source |+| `azure_blob` | Azure Blob Storage source |+| `google_drive` | Google Drive source |+| `oci_object_storage` | OCI Object Storage source |++Each [connector page](../connectors/) names the feature it needs.++## Install the CLI++The `cocoindex` CLI for Rust projects builds your crate and runs its apps: `ls`, `show`, `update`, `drop` and `init`. It is not on crates.io yet. Build it from a checkout of the repository:++```sh+git clone https://github.com/cocoindex-io/cocoindex+cd cocoindex+cargo install --path rust/cli+```++The package is `cocoindex_cli`; the binary it installs is `cocoindex`. Start a new project with it:++```sh+cocoindex init my_project+```++The scaffold depends on the SDK through its git repository. See the [CLI reference](../cli) for every command.++## System requirements++The Rust SDK is built and tested on:++- **macOS**: arm64+- **Linux**: x86_64 or arm64+- **Windows**: x86_64++</Lang>diff --git a/docs/src/content/docs/getting_started/overview.mdx b/docs/src/content/docs/getting_started/overview.mdxindex f009517d..f1a614a9 100644--- a/docs/src/content/docs/getting_started/overview.mdx+++ b/docs/src/content/docs/getting_started/overview.mdx@@ -1,5 +1,9 @@---title: CocoIndex *overview*+rust_description: >+ CocoIndex is a real-time data transformation framework for AI with incremental processing,+ with a Rust SDK that builds pipelines into your own binary: only the data that actually+ changed is reprocessed, and lineage is observable end to end.description: >CocoIndex is a real-time data transformation framework for AI with incremental processing:only the data that actually changed is reprocessed, lineage is observable end to end,@@ -19,12 +23,25 @@ If you've used React, spreadsheets, or materialized views, this will feel famili## CocoIndex features### Rust engine-CocoIndex executes pipelines with a Rust engine and a Python API.+<Lang only="python">CocoIndex executes pipelines with a Rust engine and a Python API.</Lang><Lang only="rust">CocoIndex executes pipelines with a Rust engine. The Rust SDK calls that engine directly, in your own binary, with no Python runtime.</Lang>++<Lang only="python">### Python transformationsWrite transformations in Python with your existing libraries.Write batch-style code; CocoIndex tracks dependencies and applies incremental updates in batch and live mode.+</Lang>++<Lang only="rust">++### Rust transformations+Write transformations as ordinary async Rust functions with your existing crates.+Write batch-style code; CocoIndex tracks dependencies and applies incremental updates in batch and live mode.+Attribute macros add logic tracking, memoization and batching to a function; row types derive their schema.++</Lang>+### Incremental processingCocoIndex tracks fine-grained dependencies and recomputes work affected by changes to source data or processing code.@@ -33,7 +50,7 @@ Inspect processing steps, intermediate results, and execution paths to trace how### Open integration modelSources and targets use a standard, open interface.-Use Python models, functions, and libraries in your transformations.+<Lang only="python">Use Python models, functions, and libraries in your transformations.</Lang><Lang only="rust">Use Rust crates, models, and functions in your transformations.</Lang>### Controlled concurrencyPipelines run work concurrently with configurable limits and batch requests to external services and models.@@ -57,6 +74,23 @@ What incremental processing means:Use the updated output for serving, training, or feature computation.+<Lang only="rust">++## The Rust SDK++The Rust SDK is the `cocoindex` crate. It has the same programming model as the Python SDK and runs on the same engine, with the same state database format:++- An **app** is an async function that receives a `&Ctx` and declares target states through it. `App::open` opens the app, and `app.run(...)` runs one update.+- **Functions** are `async fn`s marked with `#[cocoindex::function]`. `#[cocoindex::function(memo)]` memoizes one, and `#[cocoindex::function(batching)]` batches calls to it.+- **Processing components** are mounted with `mount!`, `use_mount!` and `mount_each!`, at stable component paths.+- **Resources**, such as a database connection or a model, are shared through typed context keys (`cocoindex::context_key!`) and read with `ctx.get_key(&KEY)`.+- **Connectors and operations** are Cargo features, so a crate builds only what it uses.+- The `cocoindex` **CLI** for Rust projects builds your crate and runs its apps.++The crate is not on crates.io yet; [Installation](./installation) shows how to depend on it from the repository.++</Lang>+## Next steps- [Install CocoIndex](./installation) and follow the [Quickstart](./quickstart) to build your first pipelinediff --git a/docs/src/content/docs/getting_started/rust_quickstart.mdx b/docs/src/content/docs/getting_started/rust_quickstart.mdxindex 2d4f58e4..2bccd9eb 100644--- a/docs/src/content/docs/getting_started/rust_quickstart.mdx+++ b/docs/src/content/docs/getting_started/rust_quickstart.mdx@@ -4,7 +4,7 @@ description: >Build an incremental Rust pipeline that chunks Markdown, batches and cacheslocal embeddings, and keeps a Postgres/pgvector table in sync.meta:- language: Rust 1.89++ language: Rust 1.91+requires: Postgres with pgvectorlanguages: [rust]# The Rust page in the quickstart slot: /docs/rust/getting_started/quickstart/.diff --git a/docs/src/content/docs/programming_guide/app.mdx b/docs/src/content/docs/programming_guide/app.mdxindex db0bb2bb..a51f6626 100644--- a/docs/src/content/docs/programming_guide/app.mdx+++ b/docs/src/content/docs/programming_guide/app.mdx@@ -95,7 +95,7 @@ let app = Environment::builder()</LangTabs>:::tip-The main function is usually async. See [How Sync and Async Work Together](./sdk_overview#how-sync-and-async-work-together) for details.+The main function is usually async. <Lang only="python">See [How Sync and Async Work Together](./sdk_overview#how-sync-and-async-work-together) for details.</Lang><Lang only="rust">See [Async only](/docs/rust/programming_guide/sdk_overview/#async-only) for details.</Lang>:::## Updating an appdiff --git a/docs/src/content/docs/programming_guide/core_concepts.mdx b/docs/src/content/docs/programming_guide/core_concepts.mdxindex 77e669fd..7f5bd56b 100644--- a/docs/src/content/docs/programming_guide/core_concepts.mdx+++ b/docs/src/content/docs/programming_guide/core_concepts.mdx@@ -188,4 +188,4 @@ Use the Programming Guide to apply these concepts in code:- [App](./app) β creating and running pipelines- [Target State](./target_state) β declaring what should exist in external systems- [Processing Component](./processing_component) β structuring work and mounting components-- [Function](./function) β the `@coco.fn` decorator, memoization, and change detection+- [Function](./function) β <Lang only="python">the `@coco.fn` decorator</Lang><Lang only="rust">the `#[cocoindex::function]` attribute</Lang>, memoization, and change detectiondiff --git a/docs/src/content/docs/programming_guide/index.mdx b/docs/src/content/docs/programming_guide/index.mdxindex 7469ffc3..b4e04571 100644--- a/docs/src/content/docs/programming_guide/index.mdx+++ b/docs/src/content/docs/programming_guide/index.mdx@@ -4,16 +4,36 @@ description: Build a pipeline from Apps, processing components, functions, and t---import DocCardGrid from '@cocoindex/brand/DocCardGrid.astro';import PipelineOverview from '/src/components/diagrams/PipelineOverview.astro';-import { programmingGuideGroups } from '/src/data/section-grids';+import { programmingGuideGroups, programmingGuideRustGroups } from '/src/data/section-grids';-Start with [Core Concepts](/docs/programming_guide/core_concepts/) for the mental model and the diagrams behind it. Use this reference to find each building block, its API, and its role in an incremental pipeline.+Start with [Core Concepts](./core_concepts) for the mental model and the diagrams behind it. Use this reference to find each building block, its API, and its role in an incremental pipeline.++<Lang only="python"><DocCardGrid groups={programmingGuideGroups.slice(0, 1)} ariaLabel="Core building blocks" />+</Lang>++<Lang only="rust">++<DocCardGrid groups={programmingGuideRustGroups.slice(0, 1)} ariaLabel="Core building blocks" />++</Lang>+## How the pieces fitAn App runs processing components. Each component calls functions and declares target states, which describe the output CocoIndex keeps in sync.<PipelineOverview />+<Lang only="python">+<DocCardGrid groups={programmingGuideGroups.slice(1)} ariaLabel="Resources and implementation details" />++</Lang>++<Lang only="rust">++<DocCardGrid groups={programmingGuideRustGroups.slice(1)} ariaLabel="Resources and implementation details" />++</Lang>diff --git a/docs/src/content/docs/programming_guide/sdk_overview.mdx b/docs/src/content/docs/programming_guide/sdk_overview.mdxindex 238e9d20..58dd1312 100644--- a/docs/src/content/docs/programming_guide/sdk_overview.mdx+++ b/docs/src/content/docs/programming_guide/sdk_overview.mdx@@ -1,14 +1,23 @@----title: Python and Rust *SDK overview*+title: Python *SDK overview*description: >A tour of the CocoIndex Python SDK β package layout (core, connectors,resources, ops), common types like StableKey, and how async orchestration- composes with sync leaf functions β and of the Rust SDK's crate layout,- feature flags and async-only API.+ composes with sync leaf functions.+rust_title: Rust *SDK overview*+rust_description: >+ A tour of the CocoIndex Rust SDK β crate layout (core, prelude, connectors,+ ops, resources), feature flags, common types like StableKey, and its+ async-only API.----import LangTabs from '../../../components/LangTabs.astro';-The CocoIndex Python SDK combines async orchestration APIs with sync or async processing functions. The [Rust SDK](#rust-sdk) exposes the same engine as an async-only crate.+<Lang only="python">++The CocoIndex Python SDK combines async orchestration APIs with sync or async processing functions.++:::note[Rust SDK]+CocoIndex also has a Rust SDK on the same engine: an async-only crate. See the [Rust SDK overview](/docs/rust/programming_guide/sdk_overview/).+:::## Package organization@@ -38,10 +47,61 @@ from cocoindex.resources.file import FileLike, PatternFilePathMatcherfrom cocoindex.resources.chunk import Chunk```+</Lang>++<Lang only="rust">++The CocoIndex Rust SDK is the `cocoindex` crate under `rust/sdk/cocoindex`. Its API is async and runs on Tokio, and your processing functions are `async fn`s.++:::note[Python SDK]+The Rust SDK calls the same core engine as the Python SDK, and the two write one state database format. See the [Python SDK overview](/docs/programming_guide/sdk_overview/).+:::++Until the crate is published, depend on it from GitHub, as [Installation](../getting_started/installation) shows:++```toml title="Cargo.toml"+[dependencies]+cocoindex = { git = "https://github.com/cocoindex-io/cocoindex", features = [+ "postgres",+ "text",+ "fastembed",+ "fs_live",+] }+```++## Crate organization++| Path | Description |+|------|-------------|+| `cocoindex` | The core API at the crate root: `App`, `Environment`, `Ctx`, `ContextKey`, `Error`, `Result`, the `#[cocoindex::function]`, `#[app]`, `#[lifespan]` and `#[main]` attributes, the `mount!`, `use_mount!` and `mount_each!` macros, `context_key!`, and the `MemoInput` and `SchemaFields` derives. The resource types (`FileEntry`, `DirTarget`, `walk_dir`, `Chunk`, `IdGenerator`, `LiveMap`, `StableKey`, ...) are re-exported here too |+| `cocoindex::prelude` | `use cocoindex::prelude::*;` imports the core API, the resource types, the macros, and `serde::{Serialize, Deserialize}` |+| `cocoindex::connectors::*` | One module per connector, each behind a feature flag of the same name: `postgres`, `sqlite`, `doris`, `lancedb`, `qdrant`, `turbopuffer`, `valkey`, `zvec`, `neo4j`, `falkordb`, `surrealdb`, `bigquery`, `snowflake`, `kafka`, `iggy`, `amazon_s3`, `azure_blob`, `oci_object_storage`, and `gdrive` (feature `google_drive`) |+| `cocoindex::ops::*` | Built-in operations: `text` (feature `text`), `sentence_transformers` and `image` (feature `fastembed`), `api` (feature `embed_api`), `code` (feature `code_match`) |+| `cocoindex::resources::*` | The resource modules behind the root re-exports: `file`, `fs`, `chunk`, `id`, `live_map`, `rate_limit`, `schema`, `view`, `embedder` |+| `cocoindex::inspect` | Reads an app's stored state: stable paths, their details, and tracked target states |++Import connectors and ops by their module; take the rest from the prelude:++{/* Rust: examples/rust/text_embedding/src/main.rs */}+```rust+use cocoindex::connectors::postgres;+use cocoindex::ops::sentence_transformers::SentenceTransformerEmbedder;+use cocoindex::ops::text::{RecursiveChunkConfig, RecursiveSplitter};+use cocoindex::prelude::*;+```++## Feature flags++Every connector and op is optional, so a pipeline compiles only the clients it uses. The other features are `fs_live` (live directory watching through `walk_dir(..).live()`), `chrono` and `rust_decimal` (`MemoInput` for those leaf types; a connector feature enables the ones it needs), and `embed_api` (remote embeddings and transcription over an OpenAI-compatible HTTP API). [Installation](/docs/rust/getting_started/installation/#feature-flags) lists them all.++</Lang>+## Common types### StableKey+<Lang only="python">+`StableKey` is a type alias defining what values can be used when creating component paths via `coco.component_subpath()`:```python@@ -53,6 +113,20 @@ Common examples include strings (like `"setup"` or `"table"`), integers, and UUIEach processing component must be mounted at a unique path. See [Processing Component](./processing_component) for how the component path tree affects target states and ownership.+</Lang>++<Lang only="rust">++`StableKey` is the enum of values that identify a processing component in the component path, and a target state within its target. Its variants are `Null`, `Bool`, `Int`, `Str`, `Bytes`, `Uuid`, `Symbol`, `Array` (a composite key) and `Fingerprint`.++APIs that take a key accept any `IntoStableKey` value: `&str`, `String`, `bool`, the integer types, `uuid::Uuid`, byte strings (`Vec<u8>`, `&[u8]`, `bytes::Bytes`), `()` (for `Null`), or a `StableKey` itself. Common examples include strings (like `"setup"` or `"table"`), integers, and UUIDs. `Symbol` provides predefined names that never conflict with strings (which typically come from runtime data).++Each processing component must be mounted at a unique path. See [Processing Component](./processing_component) for how the component path tree affects target states and ownership.++</Lang>++<Lang only="python">+## Async vs sync APIsCocoIndex's API is **async-first**. The APIs fall into three categories:@@ -146,68 +220,15 @@ asyncio.run(main())app.update_blocking(report_to_stdout=True)```-## Rust SDK--The Rust SDK is the `cocoindex` crate under `rust/sdk/cocoindex`. It calls the same core engine as the Python package, and the two write one state database format. Until the Rust SDK is published separately, depend on the CocoIndex workspace from GitHub, as the [Rust quickstart](../getting_started/rust_quickstart) shows:--```toml title="Cargo.toml"-[dependencies]-cocoindex = { git = "https://github.com/cocoindex-io/cocoindex", features = [- "postgres",- "text",- "fastembed",- "fs_live",-] }-```--### Crate organization+</Lang>-| Path | Description |-|------|-------------|-| `cocoindex` | The core API at the crate root: `App`, `Environment`, `Ctx`, `ContextKey`, `Error`, `Result`, the `#[cocoindex::function]`, `#[app]`, `#[lifespan]` and `#[main]` attributes, the `mount!`, `use_mount!` and `mount_each!` macros, `context_key!`, and the `MemoInput` and `SchemaFields` derives. The resource types (`FileEntry`, `DirTarget`, `walk_dir`, `Chunk`, `IdGenerator`, `LiveMap`, `StableKey`, ...) are re-exported here too |-| `cocoindex::prelude` | `use cocoindex::prelude::*;` imports the core API, the resource types, the macros, and `serde::{Serialize, Deserialize}` |-| `cocoindex::connectors::*` | One module per connector, each behind a feature flag of the same name: `postgres`, `sqlite`, `doris`, `lancedb`, `qdrant`, `turbopuffer`, `valkey`, `zvec`, `neo4j`, `falkordb`, `surrealdb`, `bigquery`, `snowflake`, `kafka`, `iggy`, `amazon_s3`, `azure_blob`, `oci_object_storage`, and `gdrive` (feature `google_drive`) |-| `cocoindex::ops::*` | Built-in operations: `text` (feature `text`), `sentence_transformers` and `image` (feature `fastembed`), `api` (feature `embed_api`), `code` (feature `code_match`) |-| `cocoindex::resources::*` | The resource modules behind the root re-exports: `file`, `fs`, `chunk`, `id`, `live_map`, `rate_limit`, `schema`, `view`, `embedder` |-| `cocoindex::inspect` | Reads an app's stored state: stable paths, their details, and tracked target states |+<Lang only="rust">-Import connectors and ops by their module; take the rest from the prelude:--{/* Rust: examples/rust/text_embedding/src/main.rs */}-```rust-use cocoindex::connectors::postgres;-use cocoindex::ops::sentence_transformers::SentenceTransformerEmbedder;-use cocoindex::ops::text::{RecursiveChunkConfig, RecursiveSplitter};-use cocoindex::prelude::*;-```--### Feature flags--Every connector and op is optional, so a pipeline compiles only the clients it uses. The other features are `fs_live` (live directory watching through `walk_dir(..).live()`), `chrono` and `rust_decimal` (`MemoInput` for those leaf types; a connector feature enables the ones it needs), and `embed_api` (remote embeddings and transcription over an OpenAI-compatible HTTP API). The full list is the `[features]` table of `rust/sdk/cocoindex/Cargo.toml`.--### StableKey in Rust--`StableKey` is an enum with the same variants as the Python alias: `Null`, `Bool`, `Int`, `Str`, `Bytes`, `Uuid`, `Symbol`, `Array` (a composite key) and `Fingerprint`. A mount key is any `Display` value (`&str`, `String`, a number), and a target-state key is any `IntoStableKey` value (`&str`, `String`, `i64`, `u64`, or a `StableKey`).--### Async only+## Async onlyThe Rust API is async and runs on Tokio. There are no sync variants of the orchestration APIs: `ctx.mount`, `ctx.scope`, `ctx.mount_each`, `ctx.map` and the mount macros are all `async`, and a `#[cocoindex::function]` body is an `async fn`. The entry points have `_blocking` forms for code that owns no runtime: `App::open_blocking`, `app.update_blocking`, `app.drop_state_blocking`, `EnvironmentBuilder::build_blocking`. They build a runtime of their own and panic inside one, so use the async forms inside `#[tokio::main]` or `#[cocoindex::main]`:{/* Rust: rust/sdk/SHOWCASE.md "Open and run an app" (verified against rust/sdk/cocoindex/src/app.rs), rust/sdk/cocoindex/tests/pipeline.rs */}-<LangTabs>-<Fragment slot="python">--```python-# Async entry point-async def main():- await app.update(report_to_stdout=True)--asyncio.run(main())-```--</Fragment>-<Fragment slot="rust">-```rustuse cocoindex::prelude::*;@@ -232,7 +253,6 @@ let app = App::builder("my_app").db_path(".cocoindex_db").build_blocking()?;app.update_blocking(|_ctx| async move { Ok(()) })?;```-</Fragment>-</LangTabs>-Rust has no ambient context: every API takes the component's `Ctx` explicitly, and a processing function takes `&Ctx` as its first argument. See [Function](./function) and [Processing Component](./processing_component).++</Lang>diff --git a/docs/src/data/section-grids.ts b/docs/src/data/section-grids.tsindex 0ac413f6..9a9cbcd4 100644--- a/docs/src/data/section-grids.ts+++ b/docs/src/data/section-grids.ts@@ -78,6 +78,78 @@ export const programmingGuideGroups: SectionGridGroups = [},];+// The same cards for the Rust tree, with Rust wording.+export const programmingGuideRustGroups: SectionGridGroups = [+ {+ label: 'Core building blocks',+ accent: 'coral',+ cards: [+ {+ href: '/docs/rust/programming_guide/app/',+ title: 'App',+ glyph: 'app',+ body: 'Run your pipeline. An App starts the main function and manages updates and shared resources.',+ },+ {+ href: '/docs/rust/programming_guide/target_state/',+ title: 'Target state',+ glyph: 'target',+ body: 'Describe the output you want, such as a file or database row. CocoIndex keeps that output up to date.',+ },+ {+ href: '/docs/rust/programming_guide/processing_component/',+ title: 'Processing component',+ glyph: 'component',+ body: 'Run one part of a pipeline and own its target states. Learn how to create and identify components.',+ },+ {+ href: '/docs/rust/programming_guide/function/',+ title: 'Functions',+ glyph: 'function',+ body: 'Write processing logic with #[cocoindex::function]. Enable memoization to reuse results when inputs and code stay unchanged.',+ },+ ],+ },+ {+ label: 'Resources & runtime',+ blurb: 'Share resources and respond to source changes.',+ accent: 'palm',+ cards: [+ {+ href: '/docs/rust/programming_guide/context/',+ title: 'Context',+ glyph: 'context',+ body: 'Share database connections, models, and configuration across processing components.',+ },+ {+ href: '/docs/rust/programming_guide/live_mode/',+ title: 'Live mode',+ glyph: 'livemode',+ body: 'Keep an App running so it processes source changes after the first update.',+ },+ ],+ },+ {+ label: 'Storage and SDK',+ blurb: 'Learn how CocoIndex stores results and organizes its Rust crate.',+ accent: 'peach',+ cards: [+ {+ href: '/docs/rust/programming_guide/serialization/',+ title: 'Serialization',+ glyph: 'serialization',+ body: 'Store function results for reuse. Learn which traits memoized arguments and return values implement.',+ },+ {+ href: '/docs/rust/programming_guide/sdk_overview/',+ title: 'SDK overview',+ glyph: 'sdk',+ body: 'Find the crate\'s modules, feature flags, and common types. Learn how the async-only API runs on Tokio.',+ },+ ],+ },+];+export const commonResourcesGroups: SectionGridGroup[] = [{label: 'Types & schema',