cianfhoghlaim/cianchosaint / .agents/skills/cocoindex
cocoindex
Verified| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 35.4 KB |
| references/api_reference.md | markdown | 11.0 KB |
| references/baml-extraction.md | markdown | 4.4 KB |
| references/cocoindex-api-research.md | markdown | 8.5 KB |
| references/connectors.md | markdown | 13.1 KB |
| references/fastapi-server.md | markdown | 2.3 KB |
| references/knowledge-graph-build.md | markdown | 2.8 KB |
| references/live-updates.md | markdown | 2.2 KB |
| references/multimodal-image-search.md | markdown | 1.7 KB |
| references/patterns.md | markdown | 13.6 KB |
| references/rust-port.md | markdown | 1.4 KB |
| references/setup_database.md | markdown | 4.4 KB |
| references/setup_project.md | markdown | 2.4 KB |
| references/v0-to-v1-migration.md | markdown | 7.0 KB |
references/rust-port.md
View on GitHub# Rust Port Reference
CocoIndex v1 has a Rust port of most Python flows. The Rust port
is in `cocoindex/rust/` and at the upstream
`docs/cocoindex/rust/` examples (deleted with the docs; the same
examples are in the upstream cocoindex repo).
## When to use the Rust port
- **Performance**: the Rust port is faster (no Python GIL, native
memory layout for the Arrow types)
- **Single binary deploy**: a Rust app compiles to a single static
binary (no Python runtime)
- **Edge / WASM**: CocoIndex Rust is the basis for the WASM build
For most Cianfhoghlaim use cases, the Python v1 Apps are sufficient and the
ergonomics of `@coco.fn` + BAML are better.
## Module map (Rust port)
| Python | Rust |
|:--|:--|
| `import cocoindex as coco` | `use cocoindex::prelude::*` |
| `@coco.fn` | `#[coco::fn]` |
| `@coco.fn(memo=True)` | `#[coco::fn(memo)]` |
| `@coco.lifespan` | `#[coco::lifespan]` |
| `ContextKey[T]` | `ContextKey::new_with_state(...)` |
| `mount_table_target` | `mount_table_target!` macro |
| `mount_each(fn, items, target)` | `mount_each!` macro |
| `await coco.use_context(KEY)` | `coco::use_context(KEY)` |
## Cianfhoghlaim example (Rust port)
- `cocoindex/rust/text_embedding/src/main.rs` —
mirror of `cocoindex/leabharlann_embedding.py`
(text embedding + LanceDB target)
## Running a Rust port
```bash
cd cocoindex/rust/text_embedding
cargo run -- index # catch-up
cargo run -- query "irish gaelic" # query
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |