Feature flags
By the end of this page you know which feature flags to pass to cargo add for your project. Each integration, and everything beyond the indexing pipeline and the query pipeline, sits behind a feature flag of the swiftide crate. You name the ones you need:
cargo add swiftide@0.34 --features openai,qdrantDefaults
Section titled “Defaults”Only the macros flag is on by default. It provides the #[tool] attribute, the Tool derive and the #[indexing_transformer] attribute. With default-features = false these macros are gone, so add macros back if you use them:
cargo add swiftide@0.34 --no-default-features --features macros,openaiOn docs.rs, each item that needs a flag shows an “Available on crate feature … only” badge.
The core, indexing, query and integrations crates are always compiled. The integrations crate still compiles no provider or store until you turn on its flag. Without qdrant, for example, swiftide::integrations::qdrant does not exist.
The all bundle
Section titled “The all bundle”The all flag turns on exactly these ten flags: qdrant, redis, tree-sitter, openai, fastembed, scraping, aws-bedrock, groq, ollama and pgvector.
It leaves out everything else:
- agents and tasks:
swiftide-agents,swiftide-tasks,mcp, andagents-contribwith its four sub-flags - the
anthropic(Anthropic client),gemini,dashscopeandopen-routerproviders - the
lancedbandduckdbstorage backends, theredbnode cache, and theparquet,kafkaandfluvioloaders langfuse,metrics,json-schema,tiktoken,test-utilsandtree-sitter-perl
To build an agent, add swiftide-agents next to all.
all also pulls in heavy native dependencies. fastembed downloads ONNX (Open Neural Network Exchange) runtime binaries at build time, and aws-bedrock compiles the AWS (Amazon Web Services) SDK (software development kit). Name the flags you use instead, so builds stay short.
Flag relationships
Section titled “Flag relationships”Agents, tasks and tool protocols
Section titled “Agents, tasks and tool protocols”swiftide-tasksaddsswiftide::tasks, the typed task graphs.swiftide-agentsaddsswiftide::agentsand turns onswiftide-tasks.mcpadds Model Context Protocol (MCP) tool support and turns onswiftide-agents.langfuseaddsswiftide::langfusefor tracing and also turns onswiftide-agents.json-schemaaddsJsonSchemaderives to core and agent types, and also turns onswiftide-agents.agents-contribaddsswiftide::agents_contriband turns onswiftide-agents. On its own it enables no capability.agents-contrib-context,agents-contrib-planning,agents-contrib-file-toolsandagents-contrib-lazy-executoreach turn onagents-contribplus one capability: hooks that summarize tool output and compress the conversation, a plan tool, file tools, or a lazy tool executor.
A contrib flag never registers a tool or changes an agent by itself. You still add the tool or hook to your agent.
OpenAI-compatible providers
Section titled “OpenAI-compatible providers”The groq, gemini, ollama, open-router and dashscope clients build on the OpenAI client. Each of these flags also compiles swiftide::integrations::openai.
Integrations that make HTTP (Hypertext Transfer Protocol) calls use rustls for TLS (Transport Layer Security) and need no setup, whatever flags you pick. Each HTTP client uses the process-wide rustls crypto provider if your application installed one, and otherwise its own: aws-lc-rs, or ring for anthropic. anthropic uses rustls even when another crate turns on native TLS.
Redis over rediss:// is the exception. The Redis client needs a process-wide provider, so before it connects Swiftide installs aws-lc-rs if your application has not installed one. To use a different provider, install it before the first Redis call.
In the 0.34 release the clients have no provider of their own; see Crypto provider panic.
Flag tables
Section titled “Flag tables”The “Also enables” column lists only flags of the swiftide crate. A flag that turns on a dependency’s feature, such as json-schema or langfuse turning on swiftide-agents, shows an empty cell.
General
Section titled “General”| Flag | Description | Also enables |
|---|---|---|
default | By default only macros are enabled | macros |
macros | Undocumented | |
all | Undocumented | qdrant, redis, tree-sitter, openai, fastembed, scraping, aws-bedrock, groq, ollama, pgvector |
Integrations
Section titled “Integrations”| Flag | Description | Also enables |
|---|---|---|
qdrant | Enables Qdrant for storage and retrieval | |
pgvector | Enables PgVector for storage and retrieval | |
redis | Enables Redis as an indexing cache and storage | |
tree-sitter | Tree-sitter for various code transformers | |
tree-sitter-perl | Adds Perl to the tree-sitter languages | tree-sitter |
openai | OpenAI | |
groq | Groq | |
gemini | Google Gemini | |
dashscope | Dashscope prompting | |
open-router | OpenRouter prompting | |
ollama | Ollama prompting | |
anthropic | Undocumented | |
fastembed | FastEmbed (by qdrant) for fast, local, sparse and dense embeddings | |
scraping | Scraping via spider as loader and a html to markdown transformer | |
aws-bedrock | AWS Bedrock for prompting | |
lancedb | Lancdb for persistance and querying | |
fluvio | Fluvio loader | |
kafka | Kafka loader | |
parquet | Parquet loader | |
redb | Redb embeddable nodecache | |
duckdb | Duckdb; sqlite fork, support Persist, Retrieve and NodeCache |
| Flag | Description | Also enables |
|---|---|---|
mcp | MCP tool support for agents (tools only) | swiftide-agents |
metrics | Metrics for usage, pipeline and agent performance | |
test-utils | Various mocking and testing utilities | |
json-schema | Json schema for various types | |
tiktoken | Estimate token counts using tiktoken |
Agent and task orchestration
Section titled “Agent and task orchestration”| Flag | Description | Also enables |
|---|---|---|
swiftide-tasks | Typed task graphs | |
swiftide-agents | GenAI agents and tools | swiftide-tasks |
agents-contrib | Optional agent tools, hooks, and executor helpers (no capabilities enabled). | swiftide-agents |
agents-contrib-context | Tool output summarization and conversation compression hooks. | agents-contrib |
agents-contrib-planning | A shared in-memory plan tool. | agents-contrib |
agents-contrib-file-tools | File reading with line ranges, exact replacement, and file-oriented patches. | agents-contrib |
agents-contrib-lazy-executor | Lazy initialization of caller-provided executors. | agents-contrib |
langfuse | Langfuse tracing and observability |
Reference
Section titled “Reference”swiftidecrate root, Cargo Features sectionswiftide::agentsswiftide::tasksswiftide::integrationsswiftide::langfuseswiftide::agents_contrib
Next: Crates