Skip to content

add inbound protobuf decoders (Phase 3)#450

Merged
wboayue merged 9 commits intomainfrom
feature/protobuf-decoders
Apr 11, 2026
Merged

add inbound protobuf decoders (Phase 3)#450
wboayue merged 9 commits intomainfrom
feature/protobuf-decoders

Conversation

@wboayue
Copy link
Copy Markdown
Owner

@wboayue wboayue commented Apr 11, 2026

Summary

  • Shared proto→domain converters in proto/decoders.rs (Contract, Order, OrderState, Execution, ContractDetails, and other reusable types) with pub(crate) helpers (parse_f64, optional_f64, tag_values, ts, etc.)
  • Domain-specific protobuf decoders in each module (orders, contracts, market_data/realtime, market_data/historical, accounts, news, scanner, display_groups, wsh) with _proto suffix
  • Error::ProtobufDecode(#[from] prost::DecodeError) variant — eliminates map_err boilerplate across all decoders
  • perm_id promoted from i32 to i64 in Order, Execution, and OrderStatus
  • 36 unit tests that construct protobuf bytes with prost and verify decoded domain struct fields

Test plan

  • cargo clippy --all-targets -- -D warnings
  • cargo clippy --all-targets --features sync -- -D warnings
  • cargo clippy --all-features
  • cargo fmt --check
  • cargo test (all tests pass, 36 new proto decoder + error tests)

@wboayue wboayue merged commit a016eab into main Apr 11, 2026
3 checks passed
@wboayue wboayue deleted the feature/protobuf-decoders branch April 11, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant