     ;; and then generate our output
     (let [stg  (STGroupFile. "generators/proto.stg")
           template (.getInstanceOf stg "protobuf")]
+      (.add template "messages" messages)
       (with-open [output (io/writer protopath :truncate true)]
         (.write output (.render template))))))

      (let [node (->> loc zip/node)]
        (recur (->> loc zip/next)
               (if (= node :message)
                 (cons (buildmessage loc) msgs)
                 msgs))))))

;;(defn generateproto [intf ast template]
;;  (loop [loc ast]

(defn compile [path config]

  (let [asts (compileall path config)
        messages (buildallmessages asts)
        protopath (io/file path "build/proto/project.proto")]

    ;; ensure the path exists
