Skip to content

Commit

Permalink
Add the script to update interface and update interface. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shylock-Hg authored Jul 22, 2021
1 parent bd94949 commit 668bc6c
Show file tree
Hide file tree
Showing 5 changed files with 5,019 additions and 1,838 deletions.
34 changes: 34 additions & 0 deletions gen-interface.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /usr/bin/env bash

set -e

NEBULA_THIRDPARYTY_HOME=

# Parsing options from arguments
while getopts "t:" opt; do
case $opt in
t)
NEBULA_THIRDPARYTY_HOME=${OPTARG}
;;
\?)
echo "Invalid option: -${OPTARG}" >&2
exit 1
;;
:)
echo "Option -${OPTARG} requires an argument." >&2
exit 1
;;
esac
done

for mod in common meta storage graph; do
wget https://raw.githubusercontent.com/vesoft-inc/nebula-common/master/src/common/interface/$mod.thrift
done

for mod in common meta storage graph; do
$NEBULA_THIRDPARYTY_HOME/2.0/bin/thrift1 --strict --allow-neg-enum-vals --gen "mstch_rust" -o ./src/interface/$mod/ $mod.thrift
mv ./src/interface/$mod/gen-rust/lib.rs ./src/interface/$mod
rmdir ./src/interface/$mod/gen-rust
done

rm common.thrift graph.thrift meta.thrift storage.thrift
Loading

0 comments on commit 668bc6c

Please sign in to comment.