#transform #engine #sync #step #data-sync

oversync-transforms

Declarative transform step library for the oversync data sync engine

19 releases (5 breaking)

Uses new Rust 2024

0.6.4 Apr 14, 2026
0.6.3 Apr 14, 2026
0.5.1 Apr 10, 2026
0.4.6 Apr 8, 2026
0.1.1 Mar 28, 2026

#7 in #data-sync


Apache-2.0

120KB
3.5K SLoC

oversync-transforms

Declarative transform step library for the oversync data sync engine.

Part of oversync.

What this crate provides

  • TransformStep trait -- interface for a single operation on a record's JSON data, returning keep/drop
  • StepChain -- ordered chain of steps applied sequentially; implements TransformHook for use in the sync pipeline
  • Built-in steps -- Rename, Set, Filter (with Eq/Ne/Contains operators), and more
  • parse_steps -- parse a declarative JSON step definition into a StepChain
  • Optional WASM support -- enable the wasm feature for wasmtime-based transform steps

Usage

use oversync_transforms::{StepChain, steps::{Rename, Filter, FilterOp}};

let chain = StepChain::new(vec![
    Box::new(Rename { from: "old_name".into(), to: "new_name".into() }),
    Box::new(Filter {
        field: "status".into(),
        op: FilterOp::Eq,
        value: serde_json::json!("active"),
    }),
]);

let mut data = serde_json::json!({"old_name": "val", "status": "active"});
let keep = chain.apply_one(&mut data)?;
assert!(keep);
assert_eq!(data["new_name"], "val");

Features

  • wasm -- enables wasmtime-based WASM transform steps

License

Apache-2.0

Dependencies

~10–19MB
~255K SLoC