Skip to content

feat: Add mutable storage views for trailing fixed-layout fields including Vec and Option - #2

Open
snawaz wants to merge 4 commits into
snawaz/slicefrom
snawaz/flexible-vec
Open

feat: Add mutable storage views for trailing fixed-layout fields including Vec and Option#2
snawaz wants to merge 4 commits into
snawaz/slicefrom
snawaz/flexible-vec

Conversation

@snawaz

@snawaz snawaz commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add FlexibleVec for trailing #[flexible = N] Vec<T> in fixed_offset_layout.
  • Expose storage-backed capacity for decoded trailing flexible Vec fields.
  • Add generated decode_mut(storage) and <field>_mut() APIs for mutable account/storage views.
  • Support Vec-like mutation: push, pop, set, truncate, and clear.
  • Document the storage-layout semantics and add coverage for scalar and fixed-layout Vec elements.

Testing

  • cargo fmt
  • cargo test -p wheels -p wheels-macros
  • cargo clippy -p wheels -p wheels-macros --all-targets -- -D warnings
  • cargo doc -p wheels --no-deps
  • cargo doc -p wheels-macros --no-deps

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 411805d5-68b5-47ec-b268-c81e1f219c69

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@snawaz
snawaz marked this pull request as ready for review August 9, 2026 18:22
@snawaz snawaz changed the title feat: Add mutable storage views for trailing fixed-layout Vec fields feat: Add mutable storage views for trailing fixed-layout fields including Vec and Option Aug 9, 2026
@snawaz
snawaz force-pushed the snawaz/flexible-vec branch from 0dceb34 to 684684c Compare August 9, 2026 19:31
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