| Crates.io | catalyx |
| lib.rs | catalyx |
| version | 0.1.0 |
| created_at | 2025-12-27 12:47:16.003241+00 |
| updated_at | 2025-12-27 12:47:16.003241+00 |
| description | A reactive streaming runtime inspired by join calculus and chemical reaction models |
| homepage | https://catalyx.dev |
| repository | https://github.com/singaraiona/catalyx |
| max_upload_size | |
| id | 2007154 |
| size | 53,025 |
A reactive streaming runtime built on RayforceDB, inspired by join calculus and chemical reaction models.
Catalyx brings the elegance of chemical metaphors to reactive programming. Define molecules, reactions, and watch your data flow through a reactive substrate powered by RayforceDB's ultra-fast columnar engine.
| Chemical Metaphor | Programming Concept |
|---|---|
| Molecule | Message/Event with typed payload |
| Reaction | Join pattern matching multiple molecules |
| Solution | Reactive context/namespace |
| Catalyst | Persistent trigger that isn't consumed |
| Substrate | Underlying RayforceDB storage |
# Build and run the REPL
cargo run
# Or install globally
cargo install --path .
โฏ mol ping(x: int)
โ Molecule `ping` defined
โฏ mol pong(y: int)
โ Molecule `pong` defined
โฏ react ping(a) & pong(b) => show (+ a b)
โ Reaction defined: ping โ pong โ ฮป
โฏ emit ping(21) pong(21)
42
| Command | Description |
|---|---|
:? |
Show help |
:q |
Quit REPL |
:m |
List molecules |
:r |
List reactions |
:s |
Show solution state |
:c |
Clear screen |
:t |
Toggle timing |
# Define a molecule type
mol request(id: guid, payload: string)
# Emit molecules into the solution
emit request(guid(), "hello world")
# Simple reaction consuming two molecules
react request(id, p) & response(id, r) =>
show "Got response" r "for request" id
# Reaction with guard
react tick(t) & buffer(data) where (> (count data) 100) =>
flush data
# Catalysts persist and trigger reactions without being consumed
catalyst config(settings: dict)
react request(r) & config(c) =>
process r (get c `timeout)
MIT License - see LICENSE