Skip to content

[FEAT]: Replace Rust specific protocol definitions with protobufs#3

Merged
SeedyROM merged 5 commits intomainfrom
feat/protobuf
Apr 2, 2025
Merged

[FEAT]: Replace Rust specific protocol definitions with protobufs#3
SeedyROM merged 5 commits intomainfrom
feat/protobuf

Conversation

@SeedyROM
Copy link
Owner

@SeedyROM SeedyROM commented Apr 2, 2025

  • Remove protocol.rs
  • Setup prost and protobuf codegen
  • Update server.rs to use the protobufs
  • Create methods to convert between the protobuf Value enum and the KV's Value enum.
  • Fix tests and benchmarks

@SeedyROM SeedyROM requested a review from Copilot April 2, 2025 07:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the custom Rust-specific protocol definitions with protobuf definitions across the codebase, updating serialization/deserialization and relevant dependencies accordingly. Key changes include:

  • Removal of the custom protocol module (protocol.rs) and addition of the protobuf definitions (protocol/bonka.proto).
  • Introduction of a new proto module (proto.rs) and updating conversions in the key-value store (kv.rs) to work with the new protobufs.
  • Adjustments in the benchmarking and build configuration files to support protobuf code generation and usage.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/protocol.rs Removed obsolete protocol definitions.
src/proto.rs Added module to include generated protobuf definitions.
src/lib.rs Updated module import from protocol to proto.
src/kv.rs Added conversions between KV Value enum and protobuf Value.
protocol/bonka.proto Added protobuf definitions for Value, Command, Request, Response.
build.rs Updated to compile the protobuf definitions via prost_build.
benches/bonka_benchmark.rs Revised to use protobuf serialization and deserialization.
Cargo.toml Added dependencies for prost, prost-types, and prost-build.

@codecov
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 95.98765% with 13 lines in your changes missing coverage. Please review.

Project coverage is 91.61%. Comparing base (cfe5e66) to head (f01220f).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/kv.rs 75.00% 8 Missing ⚠️
src/server.rs 98.28% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   90.31%   91.61%   +1.29%     
==========================================
  Files           8        7       -1     
  Lines        1064     1204     +140     
==========================================
+ Hits          961     1103     +142     
+ Misses        103      101       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SeedyROM SeedyROM merged commit 4cf118e into main Apr 2, 2025
3 checks passed
@SeedyROM SeedyROM deleted the feat/protobuf branch April 2, 2025 07: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

Comments