Skip to content

Feature/serialize get width#22

Merged
bertschinger merged 1 commit into
lanl:mainfrom
alambert-lanl:feature/serialize-get-width
Jun 22, 2026
Merged

Feature/serialize get width#22
bertschinger merged 1 commit into
lanl:mainfrom
alambert-lanl:feature/serialize-get-width

Conversation

@alambert-lanl

Copy link
Copy Markdown
Contributor

This adds generation of get_width(&self) -> usize functions to structures passed into serialization routines. With this addition, one can precompute the encoded width of xdr structures and thus can guarantee the success of serialization routines as well as minimize allocations.

@alambert-lanl

Copy link
Copy Markdown
Contributor Author
  • I cherry picked the first commit of the zcopy PR for some features that made getting this off the ground a little nicer. Naturally, I'll backport those and rebase
  • Similarly, this PR does not compile on a few examples as it does not handle self-referential optionals as the detection of these is buggy in main and there are some fixes in zero copy deserialization #21 that ought to be backported to main.

@alambert-lanl alambert-lanl force-pushed the feature/serialize-get-width branch 2 times, most recently from 0e0f7b3 to c8c4856 Compare June 16, 2026 16:31
@alambert-lanl

Copy link
Copy Markdown
Contributor Author

The first 4 commits of the series are dependencies that should be split out into individual commits

@alambert-lanl alambert-lanl force-pushed the feature/serialize-get-width branch 3 times, most recently from d5193be to 0a1c8da Compare June 22, 2026 01:25
@alambert-lanl

Copy link
Copy Markdown
Contributor Author

Alright, this feature is gtg

Comment thread xdr_lib/src/lib.rs Outdated
Comment thread xdr_codegen/src/codegen/mod.rs Outdated
@alambert-lanl alambert-lanl force-pushed the feature/serialize-get-width branch from 0a1c8da to 24d093c Compare June 22, 2026 21:48
@bertschinger bertschinger merged commit 48e497e into lanl:main Jun 22, 2026
1 check passed
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.

2 participants