Created
August 13, 2012 20:25
-
-
Save bookshelfdave/3343866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies: | |
# OCaml findlib | |
# http://piqi.org/ | |
git clone git@github.com:basho/riak_pb.git | |
cd src | |
rm -f *.proto | |
rm -f *.piqi | |
rm -f *.cm* | |
cp ../riak_pb/src/*.proto ./ | |
piqi of-proto riak.proto | |
piqi of-proto riak_kv.proto | |
piqi of-proto riak_search.proto | |
cat riak.piqi.additions >> riak.proto.piqi | |
# rename done to isdone. "done" is a keyword in OCaml | |
sed -i.orig -e"s/\.name done/\.name isdone \.proto-name \"done\""/ riak_kv.proto.piqi | |
piqic ocaml --pp riak.proto.piqi | |
piqic ocaml --pp riak_kv.proto.piqi | |
piqic ocaml --pp riak_search.proto.piqi | |
ocamlfind ocamlc -package piqi.runtime -c riak_piqi.ml | |
ocamlfind ocamlc -package piqi.runtime -c riak_kv_piqi.ml | |
ocamlfind ocamlc -package piqi.runtime -c riak_search_piqi.ml | |
ocamlfind ocamlc -o foo -package Unix -package piqi.runtime -linkpkg Riak_piqi.cmo Riak_kv_piqi.cmo riak.ml | |
# this just generates a executable named ./foo (which is riak.ml client()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment