Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
assembly comments exceeding 75 characters fail at build time
(
cargo check/ rust-analyzer), preventing overlong.equcomment lines in
.sfiles#[frame]to accept an optional module name argument(
#[frame("frame")]) and, when combined with#[inject]and#[prefix]on the struct, generate a constant group moduledirectly from field-level attributes, eliminating the separate
constant_group!block for frame-based groups#[offset],#[unaligned_offset],#[pubkey_offsets],#[unaligned_pubkey_offsets],#[signer_seeds],#[cpi_accounts], and#[sol_instruction]with auto-inferred
SCREAMING_SNAKE_CASEnames from the fieldname, optional name overrides, and sub-field access via
comma-separated syntax (
#[unaligned_offset(NAME, sub, "doc")])#[relative_offset(NAME, from, to, "doc")]for cross-field offset differences
RegisterMarketFrameand itsconstant_group!blockto the new field-attribute syntax, making the struct the single
source of truth for both layout and constant definitions
_pad: u32fromCreateAccountDataand rearrange theframe to maintain 8-byte alignment without it
macros/src/frame.rsintoframe/mod.rs,frame/parse.rs,and
frame/field_constants.rs, collapsing repeated offset matcharms via a shared
offset_kindhelperconstant_group!doc comment to list all supportedconstant kinds
build-scaffolding.mddocs for#[frame],signer_seeds!, andcpi_accounts!sections to document thenew field-attribute workflow