Wingfoil

June 21, 2026 · View on GitHub

CI codecov Crates.io Version Docs.rs PyPI - Version Documentation Status npm

Wingfoil

Wingfoil is a blazingly fast, highly scalable stream processing framework designed for latency-critical use cases such as electronic trading and real-time AI systems.

It ships with a growing library of production-ready I/O adapters covering tick stores, message buses, market protocols, and observability backends — so you can plug graphs into real data sources and sinks with a single line.

Wingfoil simplifies receiving, processing, distributing and monitoring streaming data across your entire stack.

Features

Quick Start

In this example we build a simple, linear pipeline with all nodes ticking in lock-step.

use wingfoil::*;
use std::time::Duration;
fn main() {
    let period = Duration::from_secs(1);
    ticker(period)
        .count()
        .map(|i| format!("hello, world {:}", i))
        .print()
        .run(RunMode::RealTime, RunFor::Duration(period*3)
    );
}

This output is produced:

hello, world 1
hello, world 2
hello, world 3

Order Book Example

Wingfoil lets you easily wire up complex business logic, splitting and recombining streams, and modulating the frequency of data. I/O adapters make it easy to plug in real data sources and sinks. In this example we load a CSV of AAPL limit orders, maintain an order book using the lobster crate, derive trades and two-way prices, and export back to CSV — all in a few lines:

let book = RefCell::new(lobster::OrderBook::default());
let get_time = |msg: &Message| NanoTime::new((msg.seconds * 1e9) as u64);
let (fills, prices) = csv_read("aapl.csv", get_time, true)
    .map(move |chunk| process_orders(chunk, &book))
    .split();
let prices_export = prices
    .filter_value(|price: &Option<TwoWayPrice>| !price.is_none())
    .map(|price| price.unwrap())
    .distinct()
    .csv_write("prices.csv");
let fills_export = fills.csv_write("fills.csv");
Graph::new(vec![prices_export, fills_export], RunMode::HistoricalFrom(NanoTime::ZERO), RunFor::Forever)
    .print()
    .run()
    .unwrap();

This output is produced:

diagram

Full example.

More Examples

Short code snippets for each adapter live in the examples README. The examples below are all runnable — see each one's README.md for setup and commands.

Core concepts

ExampleDescription
order_bookLoad NASDAQ AAPL limit orders from CSV, maintain an order book, derive trades and two-way prices, export to CSV.
breadth_firstWhy wingfoil's BFS execution avoids the O(2^N) node explosion of naive depth-first DAGs.
run_modeSwap RunMode::RealTime and RunMode::HistoricalFrom with the same graph wiring for backtesting.
asyncIntegrate Tokio async/await at graph edges (I/O adapters) while keeping the core graph synchronous.
threadingDistribute graph execution across worker threads with producer() / mapper().
dynamicAdd and remove nodes at runtime. Includes demux, dynamic-group, and dynamic-manual variants.
tracingInstrumentation modes (log, tracing, instruments) for event and span handling.
latencyPer-hop latency stamping with Traced<T, L> and LatencyReport, transported over iceoryx2.

I/O adapters

ExampleDescription
kdbKDB+ integration: time-sliced reads, cached reads (LRU file cache), and round-trip write/read/validate.
kafkaKafka / Redpanda adapter — subscribe, transform, publish pipeline via rdkafka.
fluvioFluvio distributed streaming — subscribe, transform, publish pipeline.
fixFIX 4.4 protocol: self-contained loopback, client, echo server, and live LMAX market data over TLS.
zmqZeroMQ pub/sub with direct addressing or etcd-based service discovery.
etcdetcd key-value store adapter for sub/pub with transformation.
redisRedis adapter — Pub/Sub channels (subscribe, transform, republish) and persistent Streams (snapshot + tail).
iceoryx2Zero-copy IPC over shared memory (spin, threaded, signaled polling modes).
aeronLow-latency Aeron UDP/IPC transport — publish and subscribe to i64 values with spin and threaded polling modes.
webWebSocket adapter streaming synthetic prices and receiving UI events.
telemetryMetrics export via Prometheus scraping (pull) and OpenTelemetry OTLP (push).

Get Involved!

We want to hear from you! Especially if you:

  • are interested in contributing
  • know of a project that wingfoil would be well-suited for
  • would like to request a feature or report a bug
  • have any feedback

Please do get in touch: