Skip to content

drift-labs/drift-macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drift macros

misc helpful macros

#[assert_no_slop]

throws compile-time error if repr(C) struct has hidden padding (slop)

#[assert_no_slop]
#[account(zero_copy)]
#[repr(C)]
pub struct Foo {
    pub bar: u128,
    pub baz: u8,
    pub qux: u128,
}

this will throw a compile-time error because Foo has 7 bytes of hidden padding between baz and qux

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages