Skip to content

Improve proc-macro rust user experience#217

Merged
kino-andrew merged 6 commits intomainfrom
improve-user-experience
Mar 9, 2026
Merged

Improve proc-macro rust user experience#217
kino-andrew merged 6 commits intomainfrom
improve-user-experience

Conversation

@the-orex
Copy link
Collaborator

@the-orex the-orex commented Mar 6, 2026

  1. Make top instruction wrapper non-optionnal (by implementing ::prost::Message manually when proto feature is activated)

To change consuming from:

   let Some(ref ix_inner) = ins.instruction else {
         return Ok(());
   };
   
   match ix_inner {

into

match &ins.instruction {
  1. Change struct variant for Instruction enum (by implementing ::prost::Oneof manually when proto feature is activated)

To change consuming from:

Ins2SpanningParserOutput::InsSub(ix) => {
                match &ix.instruction {
                    cpmm_instruction::Instruction::Initialize(inner) => {
                        let accounts = &inner.accounts;

into:

Ins2SpanningParserOutput::InsSub(ix) => {
                match &ix.instruction {
                    cpmm_instruction::Instruction::Initialize { ref accounts, .. } => {

@the-orex the-orex changed the title Make top instruction wrapper non-optionnal Improve proc-macro rust user experience Mar 6, 2026
@the-orex the-orex marked this pull request as ready for review March 7, 2026 16:03
@kino-andrew kino-andrew merged commit dfd915e into main Mar 9, 2026
2 checks 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