Official plugin collection for Catalyx reactive streaming runtime.
Catalyx uses a plugin-first architecture where everything is a reagent:
- REPL - Interactive shell is a reagent that emits input lines
- WebSocket - Streaming client emits messages
- Kafka - Consumer emits records
- HTTP - Client emits responses
The runtime is script-first - std.ctx defines the standard library including the REPL.
| Plugin | Reagent Types | Description |
|---|---|---|
| repl | repl, stdin |
Interactive shell - emits user input |
| websocket | ws, websocket |
WebSocket streaming client |
| kafka | kafka, blink |
Kafka/Blink message consumer |
| http | http, https |
HTTP REST client |
cargo build --release
# Install to user plugins directory
mkdir -p ~/.catalyx/plugins
cp target/release/libcatalyx_*.so ~/.catalyx/plugins/The REPL is just another reagent! In std.ctx:
import repl
stdin = reagent(repl)
on stdin(line) => eval(line)
import websocket
btc = reagent(ws, "wss://stream.binance.com:9443/ws/btcusdt@trade")
on btc(msg) => println(msg)
import kafka
events = reagent(kafka, "localhost:9092", "my-topic", 0, 0)
on events(msg) => println(msg)
import http
api = reagent(http, "https://api.github.com")
emit api("/users/octocat")
on api(response) => println(response)
Every plugin implements the same interface:
use catalyx_core::{ReagentPlugin, declare_plugin};
#[derive(Default)]
pub struct MyPlugin;
impl ReagentPlugin for MyPlugin {
fn name(&self) -> &'static str { "myplugin" }
fn version(&self) -> &'static str { env!("CARGO_PKG_VERSION") }
fn reagent_types(&self) -> Vec<&'static str> { vec!["mytype"] }
fn factory(&self, _: &str) -> Option<Box<dyn ReagentPluginFactory>> {
Some(Box::new(MyFactory))
}
fn description(&self) -> &'static str { "My custom plugin" }
}
declare_plugin!(MyPlugin);catalyx-plugins/
├── Cargo.toml
├── README.md
└── crates/
├── repl/ # Interactive REPL plugin
├── websocket/ # WebSocket client
├── kafka/ # Kafka consumer
└── http/ # HTTP client
MIT