This is because they are stored as pointers, so when trying to access the fields it does not work properly.
This can be worked around by declaring each field separately, but this could become quite tedious with very large structs.
non-working Example:
struct Vec2 {
x: float,
y: float,
}
struct Camera {
pos: Vec2,
rotation: float,
}
Working example:
struct Camera {
posx: float,
posy: float,
rotation: float,
}