Expand description
Core building blocks for streaming-based Solana data indexing with Carbon.
§Components
pipeline— orchestrates data flow from datasources to processors.datasource— ingestion layer definingDatasourceandUpdatetypes.processor— user-defined handlers viaProcessor<T>trait.account,instruction,transaction,account_deletion,block_details— pipeline stages and update-specific models.filter— routing layer applied to all pipes (scoping, deduplication, slot constraints).metrics— atomic observability primitives and global registry.collection— multi-decoder routing for transaction instruction sets.deserialize— shared Borsh utilities for decoder crates.
§Optional features
postgres— SQL-backed processors usingsqlx.graphql— GraphQL schema + Axum integration.
Re-exports§
pub use borsh;
Modules§
- account
- Account-shaped pipe wiring + per-account metadata and decoder traits.
- account_
deletion - Account-deletion pipe wiring.
- account_
utils - Positional
AccountMetaiteration helpers used by generated decoders. - block_
details - Block-details pipe wiring.
- collection
- Multi-decoder routing primitive for transaction-level instruction dispatch.
- datasource
- Ingestion layer of the pipeline: defines upstream data sources and the normalized update types they emit.
- deserialize
- Borsh helpers shared by Codama-generated decoder crates.
- error
- Crate-wide error type and
Resultalias used across the pipeline. - filter
- Per-pipe filtering layer applied to updates before processing.
- instruction
- Instruction decoding, CPI nesting, and instruction-shaped pipe wiring.
- metrics
- Lock-free metrics primitives + global registry + exporter trait.
- pipeline
- Pipeline orchestrator — central runtime that wires datasources,
pipes, filters, and metrics into a single
run()loop. - processor
- Processor trait — user-defined handler executed for each decoded update.
- transaction
- Transaction-shaped pipe wiring + per-transaction metadata.
- transformers
- Internal helpers that turn datasource payloads into pipeline-ready shapes.
- try_
decode_ ixs
Macros§
- instruction_
decoder_ collection - Generate a sum-type instruction enum over multiple program decoders along
with its
InstructionDecoderCollectionimpl. - try_
decode_ instructions - Try-decode a Solana
Instructionagainst a series of variant/type pairs, returning the first variant whosedecodeandarrange_accountsboth succeed.
Derive Macros§
- Instruction
Type - Derive a sibling
*Typeenum (variant tags only) and aget_instruction_type(&self) -> *Typeaccessor on the annotated enum.