// FFI struct-marshalling baselines. Two shapes covered today: // Vec2 — 8 bytes (two f32) — register pair, float path // Vec4f — 16 bytes (four f32) — homogeneous float aggregate (HFA) // Declared here so the .c has a header to include; the sx side // imports via `#source` only and re-declares the structs natively // (c_import currently rewrites struct-typed params/returns to *void, // which loses the by-value ABI). typedef struct { float x; float y; } Vec2; typedef struct { float x; float y; float z; float w; } Vec4f; Vec2 ffi_vec2_make (float x, float y); Vec2 ffi_vec2_swap (Vec2 v); float ffi_vec2_sum (Vec2 v); Vec4f ffi_vec4f_make (float x, float y, float z, float w); Vec4f ffi_vec4f_reverse(Vec4f v); float ffi_vec4f_sum (Vec4f v);