title: Code generation for multiple platforms
body: <p>I'm designing an orchestration engine which can automate tasks within multiple environments: JavaScript web UIs, Python webservers, and c runtimes. One possible approach to is to write the orchestration core in each language. That seems brittle as each new engine feature will need to be added to each supported language (and bugs will have to be resolved multiple times, all while dealing with different idioms in each language). Another approach would be to write the core once in the lowest common denominator language (possibly c) and then wrap it in the other languages. But, I think deployment of the compiled libraries to browsers would be a nightmare if not impossible. So, another option I'm considering is templates and code generation. The engine could then be written once (probably in Python), and the workflows compiled to each target using jinja templates.</p>
  
  <p>Does this last approach sound feasible? If I go that route, what pitfalls should I be aware of? Should I suck it up and write the engine three times?</p>