Cross language message format tool supporting rust

i have a need to describe a data structure that is cross language and good for serialization and it needs to support rust hence i am here asking

my requirements are:

  • generally describe a structure in C or rust
  • input format must be tech writer friendly.
  • must generate rust structs, c structures, and c# structs
  • must generate compile time tables to encode and decode the struct
  • in rust pass a slice and a compiled description of some type and get a struct back.
  • in rust pass a struct and a compiled description and it is encoded into a slice
  • that slice can be sent or received as a udp message or saved to a spi/i2c flash
  • embedded (and no_sys) friendly - no memory allocation

this screams asn.1 and it screams rust serdes but these do nit meet other requirements
i have also looked at facebook/apache thrift and protobufs each help but leave large holes

so i am looking for a suggestion that is rust friendly

Protobuf would be the thing I'd reach for. What holes did it have?

why not protobufs:

my customer facing docs require a nicely formatted table of fields with highlighting etc.
this can be done in excell and formatting survives cut/paste operations to msword
note msword docs (pdfs) is a hard customer facing requirement.

converting proto bufs input format to an excell table for documentation formating is fraught with error prone problems in the conversion process because it is very human/manual.

copy paste between excell & word is easy

big advantage of proto bufs is you can diff the ascii text format as part of a code review

rust proto bufs requires a c++ library which then requires new/delete aka malloc/free which is a nogo for us in the embedded side

tech docs (actually any non sw engineering types) has huge problems with anything other then msword. tech docs include non tech docs like program managers, project people tech support etc they find notepad screws them up bad.

this also applies to asn.1 and others

This seems like a problem that could be solved straightforwardly by writing a tool that reads the .proto file and produces the table, and which is unlikely to be solved better by picking a different format.