oxidecomputer / oxidecomputer/daft

Please support Serialize for generated Diff structs

Open
#75 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
78
Forks
6
PR merge metrics
No merged PRs in 30d

Description

We're using this crate at work to generate diffs between complicated structs.
Recently it became necessary to serialize differences out to file, so I added quick and dirty Serialize support by putting #[derive(Serialize)] in a small number of places. (see here)
The main problem with this approach (beyond being a dirty hack) is that the entire Diff structure is serialized rather than just the branches/leaves with changes in them.
I'm not good enough with macros to attempt to change that.

Would you please consider making Diff structs serializable in a way that leaves out unchanged parts? It'd be extremely helpful. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked daft-serialize branch and the crate's generated Diff structures and serialization-related macro entry points. Determine how unchanged branches and leaves should be omitted, then add coverage showing that serialized output contains only changed parts while preserving the intended changed-value representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.