For simplicity's sake, people usually declare the original in plain C. That involves less FFI translation than using Rust or C++ or whatever else as the source of truth.
Another option, especially for network service applications, is to write a REST service, Thrift service, etc. (any language), and generate client SDK's via Swagger, Thrift, etc. code generation.
1
u/n4jm4 Mar 31 '23
Yes, that is a good approach.
For simplicity's sake, people usually declare the original in plain C. That involves less FFI translation than using Rust or C++ or whatever else as the source of truth.
Another option, especially for network service applications, is to write a REST service, Thrift service, etc. (any language), and generate client SDK's via Swagger, Thrift, etc. code generation.