From: Joel Reymont <joelr1@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] oasis and thrift
Date: Mon, 21 Mar 2011 20:17:52 +0000 [thread overview]
Message-ID: <8304C39B-0086-44A8-A49F-7A7539E9295C@gmail.com> (raw)
I'm trying to use Apache Thrift with Oasis.
Suppose I have a project directory structure that looks like this:
protocol\
message1.thrift
message2.thrift
...
ocaml\
project1
project2
...
OCaml projects use Oasis and automatically generate *.ml from *.thrift using a custom rule in ocamlbuild, e.g.
open Ocamlbuild_plugin;;
open Command;;
let thrift = A"thrift";;
rule "thrift: %.thrift -> %_types.ml"
~prods:["%.ml";"%_consts.ml";"%_types.ml";"%_types.mli"]
~deps:["%.thrift"]
begin
fun env build ->
Cmd(S[thrift; A"-gen"; A"ocaml"; P(env "%.thrift")])
end
;;
I'm skipping the issue of parsing dependencies by looking at Thrift "include" directives for now but do want to define path to protocol in the Oasis file for each project. This is so that I can pass -I to thrift above.
How can this be done with Oasis?
Thanks, Joel
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
next reply other threads:[~2011-03-21 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 20:17 Joel Reymont [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-03-18 13:22 Joel Reymont
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8304C39B-0086-44A8-A49F-7A7539E9295C@gmail.com \
--to=joelr1@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox