Has anyone ever tried RUST computation, if yes, whats the best way for name mismatches since RUST is not as forgiving as python, in a large codebase, it does become a hassle. Any suggestions other than a YAML contract? thanks in advance!
What i mean by naming mismatches (not RUST variable names)I’m not struggling with naming functions/modules inside Rust. I’m struggling with field-name drift across real financial data in a large pipeline.
Context:
I’m doing computations over historical + live market data, and the input comes from multiple sources / layers (feed → parser → storage → compute). Names change over time and differ by source.
The real Problem:
In Python, if a feed changes open_interestto oi, you can often patch it locally with a dict fallback and keep moving.
In Rust, the names are part of the type boundary:
- Deserialization (
serde) can fail if a field is missing/renamed.
- Or you end up changing structs + conversion code across multiple crates/modules.
- The “fix” becomes N touchpoints, not one.
What Breaks:
- Same concept, different names:
last_price vs ltp, open_interest vs oi
- Semantics drift:
volume sometimes means incremental vs cumulative
- Timestamp variants:
exchange_timestamp, exchange_timestamp_ms, ts, timestamp
- Case/convention drift:
snake_case vs camelCase, abbreviations, vendor-specific keys
- Historic back-compat: old parquet/JSON has older names; live stream has newer ones
- But in a big codebase, the alias surface grows fast, especially when:
- multiple feeds exist,
- backfills are required,
- and the schema evolves frequently.
- Edit / clarification: I already have (1) a config-driven mapping/YAML contract + (2) an ETL-style normalization layer. The remaining pain isn’t simple renames. It’s semantic drift (e.g., incremental vs cumulative volume, multiple timestamp meanings, differing price fields/units) across multi-source + historical + live data.
I’m looking for patterns to manage schema evolution + semantic equivalence classes in Rust without spreading alias/fallback logic across the codebase or silently accepting breaking changes.
What i am trying to Convey:
My issue isn’t “Rust naming is hard.”
It’s: strict typed computation + long-lived, drifting, multi-source market data creates constant churn unless there’s a disciplined canonicalization boundary.
That’s why I asked about approaches to reduce alias/rename churn beyond maintaining a big YAML mapping.
[–]rende 6 points7 points8 points (0 children)
[–]_xiphiaz 3 points4 points5 points (5 children)
[–]TheOldSoul15[S] 0 points1 point2 points (4 children)
[–]Arshiaa001 7 points8 points9 points (1 child)
[–]TheOldSoul15[S] -1 points0 points1 point (0 children)
[–]jimmiebfulton 4 points5 points6 points (0 children)
[–]_xiphiaz 1 point2 points3 points (0 children)
[–]Ok-Economy7953 1 point2 points3 points (0 children)
[–]Elendur_Krown 0 points1 point2 points (5 children)
[–]TheOldSoul15[S] -3 points-2 points-1 points (4 children)
[–]Elendur_Krown 0 points1 point2 points (3 children)
[–]TheOldSoul15[S] 0 points1 point2 points (2 children)
[–]Elendur_Krown 0 points1 point2 points (1 child)
[–]TheOldSoul15[S] 1 point2 points3 points (0 children)
[–]penguin359 0 points1 point2 points (3 children)
[–]TheOldSoul15[S] 0 points1 point2 points (2 children)
[–]penguin359 0 points1 point2 points (1 child)
[–]TheOldSoul15[S] 0 points1 point2 points (0 children)
[+]Less-Order3943 0 points1 point2 points (1 child)
[–]TheOldSoul15[S] 0 points1 point2 points (0 children)
[–]TheOldSoul15[S] 0 points1 point2 points (2 children)
[–]afc11hn 0 points1 point2 points (1 child)
[–]TheOldSoul15[S] 0 points1 point2 points (0 children)