Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if ABI encoder/decoder can accept something that can be turned into an iterator instead of slice #1432

Open
digorithm opened this issue Jun 15, 2024 · 0 comments

Comments

@digorithm
Copy link
Member

No description provided.

@Dentosal Dentosal mentioned this issue Jan 6, 2025
4 tasks
Dentosal added a commit that referenced this issue Jan 17, 2025
- Related to #1432

# Release notes

In this release, we:

- Changed `ABIDecoder` methods to take `std::io::Read` instead of
`&[u8]`, allowing it to be used in a streaming manner.

# Summary

`ABIDecoder` methods take `bytes: impl std::io::Read` instead of `bytes:
&[u8]`. This allows decoding abi types without having to know the size
in advance. This is particularly useful when reading them directly from
VM memory, which will be used by the indexer after
FuelLabs/fuel-core#2491 is done.

# Breaking Changes

`ABIDecoder` methods take `bytes: impl std::io::Read` instead of `bytes:
&[u8]`. Callers using arrays or `Vec` must change the argument from
`&value` to `value.as_slice()`.

# Checklist

- [x] All **changes** are **covered** by **tests** (or not applicable)
- [x] All **changes** are **documented** (or not applicable)
- [x] I **reviewed** the **entire PR** myself (preferably, on GH UI)
- [x] I **described** all **Breaking Changes** (or there's none)

---------

Co-authored-by: hal3e <[email protected]>
Co-authored-by: Ahmed Sagdati <[email protected]>
Co-authored-by: segfault-magnet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant