ie something like mystruct_t myfunc() { // ... blah return { field1: val1, field2: val2; }; }assuming that the return type is defined suitably, and the struct is just a C struct, plain-old-data (ie not a C++-like class).
I've had to set up a throwaway const item, initialised, and then had to return that.