I am currently in the process of creating ports for various components
related to CloudABI, including ARPC (an RPC framework that supports file
descriptor passing) and Flower (a capability-based network backplane).
The former comes with a script called 'aprotoc' for creating C++
bindings for messages and RPC services. This script depends on Python's
toposort package to order declarations in the resulting C++ header file,
taking dependencies into account.