Re:Ask HN: Why aren’t libraries inter-callable by default?
by tedmiston on Monday June 25, 2018 @06:16PM
(#17396298)
Some people use protobufs to achieve a setup sorta like what you described. They work well if you have common REST objects but want to write microservices in multiple languages.
Coconut (https://github.com/evhub/coconut) might be interesting to you too.