I know there is the `align` pragma but I guess that won't help me in my case. 
I'm looking for a way to automatically add paddings to objects. Like C# 
[FieldOffset](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.fieldoffsetattribute?view=net-5.0)

eg.:

Instead of: 
    
    
    type Controller* = object
      pad_0000: array[0xF0, byte]
      velocity*: array[3, float32]       #  Field at: 0xF1
    
    
    Run

I would like to use: 
    
    
    type Controller* = object
      velocity* {.fieldOffset(0xF1).}: array[3, float32]
    
    
    Run

Any help would be greatly appreciated

Reply via email to