flyby 0.1.1

A high-performance Rust framework for composable data-ingestion pipelines.
Documentation
#![doc = include_str!("../docs/README.md")]
//!
//! # flyby
//!
//! High-performance composable data-ingestion pipelines.
//!
//! ```rust
//! use flyby::prelude::*;
//! ```
//!
//! ## Crate layout
//!
//! | Module | Role |
//! |--------|------|
//! | [`core`] / [`api`] | Traits, errors, lifecycle, metrics |
//! | [`memory`] | Shared-memory SPSC sink (feature `memory`, default) |
//! | [`net`] | Network simulator + AF_XDP/DPDK stubs |
//! | [`storage`] | File source, framing, replay + io_uring/SPDK stubs |
//! | [`pipeline`] / [`runtime`] / [`builder`] | Composition and execution |
//!
//! ## Feature flags
//!
//! | Feature       | Default | Description                                  |
//! |---------------|---------|----------------------------------------------|
//! | `memory`      | yes     | In-process shared-memory sink.               |
//! | `af_xdp`      | no      | AF_XDP source stub (Linux eBPF / XSK).       |
//! | `dpdk`        | no      | DPDK source stub.                            |
//! | `io_uring`    | no      | io_uring storage backend stub.               |
//! | `spdk`        | no      | SPDK storage backend stub.                   |
//! | `simulator`   | no      | Builder flag for the in-process net simulator. |
//! | `benchmarks`  | no      | Reserved for optional bench wiring.          |
//!
//! ## Runtime (Part VII)
//!
//! See [`runtime`] for scheduling, back-pressure, configuration, and the
//! lifecycle driver. ADRs: batch-oriented runtime (009), runtime independent
//! of backends (010).

#![deny(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]

/// Contract layer: traits, errors, lifecycle, and metrics.
pub mod core;

/// Shared-memory sink (default backend).
#[cfg(feature = "memory")]
pub mod memory;

/// Networking backends (simulator always; AF_XDP/DPDK behind features).
pub mod net;

/// Storage backends (file/framing/replay always; io_uring/SPDK behind features).
pub mod storage;

/// Core traits, errors, and lifecycle (alias of [`core`]).
pub mod api {
    pub use crate::core::{
        CountingCollector, Decoder, DefaultSchemaId, Encode, Error, ErrorKind, Lifecycle, Message,
        Metadata, MetricKey, MetricKind, MetricsCollector, NullCollector, Pipeline, Placement,
        PreProcessor, Result, SchemaId, Sink, SinkId, Source, StepOutcome, Timestamp,
    };
}

pub use api::*;

pub mod builder;
pub mod pipeline;
pub mod runtime;

/// The public prelude.
pub mod prelude {
    pub use crate::api::*;
    pub use crate::builder::{FlyBy, FlyByBuilder};
    pub use crate::pipeline::{
        CallbackPlacement, DropAllPlacement, FixedPlacement, HashPlacement, IdentityPreProcessor,
        NetworkBatchSource, RawBatchSource, RoundRobinPlacement, SimplePipeline,
        StorageBatchSource, schema_hash_placement,
    };
    pub use crate::runtime::{
        BackpressureStrategy, Runtime, RuntimeConfig, RuntimePhase, SchedulerKind,
        SingleThreadScheduler, WorkerPoolScheduler,
    };
}