Zero-copy C/C++
Uses packed structs that map directly to memory. No encoding or decoding step required.

Zero-copy C/C++
Uses packed structs that map directly to memory. No encoding or decoding step required.
Flexible framing
Multiple frame profiles for different scenarios, from zero-overhead trusted links to robust multi-node networks.
Nested messages & arrays
Unlike Mavlink, supports complex message structures with nested messages and variable-length packing for arrays.
Cross-platform
Generate code for embedded C, server Python, and frontend TypeScript from a single proto definition.
pip install struct-frameCreate a schema, status.sf:
package example;
message Status { option msgid = 1; uint32 id = 1; float value = 2;}Generate code:
# Python and C into generated/py and generated/cstruct-frame status.sf --lang py,c
# Every language, under build/gen/<lang>struct-frame status.sf --lang all --out build/gen#include "example.structframe.hpp"#include "frame_profiles.hpp"
structframe::example::Status msg{};msg.id = 42;msg.value = 3.14f;
// Fixed messages are packed structs; the writer frames them with a checksumuint8_t buffer[64];structframe::ProfileStandardWriter writer(buffer, sizeof(buffer));writer.write(msg);from structframe.example import Status
msg = Status(id=42, value=3.14)data = msg.serialize()import { Status } from './example.structframe';
const msg = new Status({ id: 42, value: 3.14 });const data = msg.serialize();#include "example.structframe.h"
ExampleStatus msg = { .id = 42, .value = 3.14f };
uint8_t buffer[64];buffer_writer_t writer;buffer_writer_init(&writer, &PROFILE_STANDARD_CONFIG, buffer, sizeof(buffer));ExampleStatus_write(&writer, &msg); /* frame + checksum */