Skip to content

shared: Add feature to simply enlarge buffers#286

Merged
geonnave merged 2 commits intolake-rs:mainfrom
chrysn-pull-requests:python-quad-sizes
Jun 21, 2024
Merged

shared: Add feature to simply enlarge buffers#286
geonnave merged 2 commits intolake-rs:mainfrom
chrysn-pull-requests:python-quad-sizes

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Jun 21, 2024

This does not do away with the need for better control over the shared library's buffer sizes, but merely provides a band-aid through which sending credential-by-value works with non-near-zero subject sizes.

A proper and full solution may need a lot of further discussion (like, use generics? flags?), but this at least ensures that Python users (which are generally not too limited on memory) don't run out of space while experimenting.

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Jun 21, 2024

This should also take pressure off during testing; for example, in #279 (comment), a temporary change sneaked into a commit. We currently don't even have examples of sending credentials by-value because not all but at least the test vector credentials are too large to send.

@geonnave
Copy link
Copy Markdown
Collaborator

I agree we need something in this direction. Please also note that #284 is introducing a new EdhocBuffer type with const generics so we can at least have a finer control over buffer sizes (we will probably expect some to be potentially larger than others, for example Credential and Message buffers may need to be quite large, while buffers for variable-size kids should not be too large).

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Jun 21, 2024

Fixed the C issue.

Yeah, I think that generics will be the way to go from here; either as numeric parameters, or even by accepting any AsMut<[u8]> (or something similar) such as [u8; N] or Box<[u8]>; but that may take some more time to mature.

@geonnave geonnave merged commit cfb5c68 into lake-rs:main Jun 21, 2024
@chrysn chrysn deleted the python-quad-sizes branch June 21, 2024 14:42
@chrysn chrysn mentioned this pull request Jun 21, 2024
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