mesatee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ms...@apache.org
Subject [incubator-mesatee] branch master updated: Reorgnize the generated files (#87)
Date Sat, 23 Nov 2019 02:14:03 GMT
This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee.git


The following commit(s) were added to refs/heads/master by this push:
     new 44e3823  Reorgnize the generated files (#87)
44e3823 is described below

commit 44e38239f6a64d1de9c775f06fac6112cafd4003
Author: Rundong Zhou <rundongzhou@gmail.com>
AuthorDate: Fri Nov 22 18:13:54 2019 -0800

    Reorgnize the generated files (#87)
    
    - bin and out are no longer used.
    - MESATEE_BIN_DIR is removed.
    - out are moved to <build_dir>/intermediate.
    - bin are reorgnized to release/service, release/example, release/lib,
    etc.
---
 CMakeLists.txt                                     |   6 +-
 cmake/MesaTEEGenVars.cmake                         |  13 +-
 cmake/MesaTEEUtils.cmake                           |  14 +-
 cmake/UtilTargets.cmake                            |   2 +-
 cmake/scripts/gen_enclave_sig.sh                   |  13 +-
 cmake/scripts/prep.sh                              |   7 +-
 cmake/scripts/sgx_link_sign.sh                     |   6 +-
 cmake/scripts/sgx_test.sh                          |   4 +-
 config.toml                                        |   8 +-
 docs/how_to_build.md                               |   1 -
 examples/dbscan/dbscan_demo.sh                     |   2 +-
 examples/dbscan/src/main.rs                        |  14 +-
 .../gaussian_mixture_model_demo.sh                 |   2 +-
 examples/gaussian_mixture_model/src/main.rs        |  14 +-
 .../gaussian_processes/gaussian_processes_demo.sh  |   2 +-
 examples/gaussian_processes/src/main.rs            |  14 +-
 examples/gbdt/gbdt_demo.sh                         |   2 +-
 examples/gbdt/src/main.rs                          |  14 +-
 examples/gen_linear_model/gen_linear_model_demo.sh |   2 +-
 examples/gen_linear_model/src/main.rs              |  14 +-
 examples/image_resizing/image_resize_demo.sh       |   2 +-
 examples/image_resizing/src/main.rs                |  14 +-
 examples/kmeans/kmeans_demo.sh                     |   2 +-
 examples/kmeans/src/main.rs                        |  14 +-
 examples/lin_reg/lin_reg_demo.sh                   |   2 +-
 examples/lin_reg/src/main.rs                       |  14 +-
 examples/logistic_reg/logistic_reg_demo.sh         |   2 +-
 examples/logistic_reg/src/main.rs                  |  14 +-
 examples/naive_bayes/naive_bayes_demo.sh           |   2 +-
 examples/naive_bayes/src/main.rs                   |  14 +-
 examples/neural_net/neural_net_demo.sh             |   2 +-
 examples/neural_net/src/main.rs                    |  14 +-
 examples/online_decrypt/online_decrypt_demo.sh     |   2 +-
 examples/online_decrypt/src/main.rs                |  14 +-
 .../private_join_and_compute/four_party_bench.sh   |   2 +-
 .../private_join_and_compute/four_party_demo.sh    |   2 +-
 examples/private_join_and_compute/src/main.rs      |  14 +-
 .../private_join_and_compute/three_party_demo.sh   |   2 +-
 examples/py_file/py_file.sh                        |   2 +-
 examples/py_file/src/main.rs                       |  16 +--
 examples/py_logistic_reg/py_logistic_reg.sh        |   2 +-
 examples/py_logistic_reg/src/main.rs               |  18 +--
 examples/py_matrix_multiply/py_matrix_multiply.sh  |   2 +-
 examples/py_matrix_multiply/src/main.rs            |  14 +-
 examples/quickstart/run.sh                         |   2 +-
 examples/quickstart/src/main.rs                    |  14 +-
 examples/quickstart_c/main.c                       |  14 +-
 examples/quickstart_c/run.sh                       |   2 +-
 examples/rsa_sign/rsa_sign.sh                      |   2 +-
 examples/rsa_sign/src/main.rs                      |  14 +-
 examples/svm/src/main.rs                           |  14 +-
 examples/svm/svm_demo.sh                           |   2 +-
 mesatee_config/build.rs                            |   3 +-
 tests/functional_test.sh                           |   5 +-
 tests/integration_test.sh                          |  44 +++----
 tests/integration_test/src/wasm/mod.rs             | 144 ++++++++++-----------
 56 files changed, 309 insertions(+), 291 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cb68d3..f47dc3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@ foreach(package_name ${UNIX_APPS})
         TARGET_NAME "${UNIXAPP_PREFIX}-${package_name}"
         TOML_DIR ${MT_UNIX_TOML_DIR}
         TARGET_DIR ${UNIX_TARGET_DIR}
+        INSTALL_DIR ${MESATEE_EXAMPLE_INSTALL_DIR}
         DEPENDS prep ${TARGET_CONFIG_GEN}
     )
 endforeach()
@@ -57,6 +58,7 @@ foreach(package_name ${SGX_MODULES})
         TARGET_NAME "${SGXAPP_PREFIX}-${package_name}"
         TOML_DIR ${MT_SGXAPP_TOML_DIR}
         TARGET_DIR ${UNTRUSTED_TARGET_DIR}
+        INSTALL_DIR ${MESATEE_SERVICE_INSTALL_DIR}
         DEPENDS prep ${TARGET_CONFIG_GEN}
     )
 endforeach()
@@ -100,7 +102,7 @@ add_cargo_build_dylib_target(mesatee_sdk_c
 )
 
 # example/quickstart_c
-link_directories(${MESATEE_BIN_DIR})
+link_directories(${MESATEE_LIB_INSTALL_DIR})
 add_executable(quickstart_c ${MESATEE_PROJECT_ROOT}/examples/quickstart_c/main.c)
 add_dependencies(quickstart_c prep ${TARGET_CONFIG_GEN} ${UNIXLIB_PREFIX}-mesatee_sdk_c)
 target_include_directories(quickstart_c
@@ -108,7 +110,7 @@ target_include_directories(quickstart_c
 target_link_libraries(quickstart_c mesatee_sdk_c)
 add_custom_command(TARGET quickstart_c POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/quickstart_c
-    ${MESATEE_BIN_DIR}/quickstart_c
+    ${MESATEE_EXAMPLE_INSTALL_DIR}/quickstart_c
 )
 
 add_enclave_sig_target_n_hooks()
diff --git a/cmake/MesaTEEGenVars.cmake b/cmake/MesaTEEGenVars.cmake
index dd49edd..0bf3120 100644
--- a/cmake/MesaTEEGenVars.cmake
+++ b/cmake/MesaTEEGenVars.cmake
@@ -1,8 +1,11 @@
 set(MESATEE_PROJECT_ROOT ${PROJECT_SOURCE_DIR})
 set(MESATEE_BUILD_ROOT ${PROJECT_BINARY_DIR})
-set(MESATEE_OUT_DIR ${PROJECT_SOURCE_DIR}/out)
-set(MESATEE_BIN_DIR ${PROJECT_SOURCE_DIR}/bin)
-set(MESATEE_AUDITORS_DIR ${PROJECT_SOURCE_DIR}/auditors)
+set(MESATEE_OUT_DIR ${PROJECT_BINARY_DIR}/intermediate)
+set(MESATEE_INSTALL_DIR ${PROJECT_SOURCE_DIR}/release)
+set(MESATEE_SERVICE_INSTALL_DIR ${MESATEE_INSTALL_DIR}/service)
+set(MESATEE_EXAMPLE_INSTALL_DIR ${MESATEE_INSTALL_DIR}/example)
+set(MESATEE_LIB_INSTALL_DIR ${MESATEE_INSTALL_DIR}/lib)
+set(MESATEE_AUDITORS_DIR ${MESATEE_SERVICE_INSTALL_DIR}/auditors)
 set(MESATEE_TARGET_DIR ${PROJECT_BINARY_DIR}/target)
 
 set(TOOLCHAIN_DEPS_DIR ${PROJECT_SOURCE_DIR}/toolchain_deps)
@@ -103,8 +106,10 @@ dbg_message("UNIXAPP_PKGS_P=${UNIXAPP_PKGS_P}")
 set(MESATEE_COMMON_ENVS
     MESATEE_PROJECT_ROOT=${MESATEE_PROJECT_ROOT}
     MESATEE_BUILD_ROOT=${MESATEE_BUILD_ROOT}
-    MESATEE_BIN_DIR=${MESATEE_BIN_DIR}
     MESATEE_OUT_DIR=${MESATEE_OUT_DIR}
+    MESATEE_SERVICE_INSTALL_DIR=${MESATEE_SERVICE_INSTALL_DIR}
+    MESATEE_EXAMPLE_INSTALL_DIR=${MESATEE_EXAMPLE_INSTALL_DIR}
+    MESATEE_LIB_INSTALL_DIR=${MESATEE_LIB_INSTALL_DIR}
     MESATEE_TARGET_DIR=${MESATEE_TARGET_DIR}
     MESATEE_AUDITORS_DIR=${MESATEE_AUDITORS_DIR}
     MESATEE_CFG_DIR=${PROJECT_SOURCE_DIR}
diff --git a/cmake/MesaTEEUtils.cmake b/cmake/MesaTEEUtils.cmake
index e014c6a..62bf251 100644
--- a/cmake/MesaTEEUtils.cmake
+++ b/cmake/MesaTEEUtils.cmake
@@ -28,7 +28,7 @@ endfunction()
 # )
 function(add_cargo_build_target package_name)
     set(options NOT_SET_COMMON_ENV)
-    set(oneValueArgs TARGET_NAME TOML_DIR TARGET_DIR)
+    set(oneValueArgs TARGET_NAME TOML_DIR TARGET_DIR INSTALL_DIR)
     set(multiValueArgs DEPENDS EXTRA_CARGO_FLAGS)
     cmake_parse_arguments(MTEE "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})
@@ -39,6 +39,12 @@ function(add_cargo_build_target package_name)
         set(_target_name cg_${package_name})
     endif()
 
+    if (DEFINED MTEE_INSTALL_DIR)
+        set(_copy_dir ${MTEE_INSTALL_DIR})
+    else()
+        set(_copy_dir ${MESATEE_INSTALL_DIR})
+    endif()
+
     if (MTEE_NOT_SET_COMMON_ENV)
         set(_envs)
     else()
@@ -55,7 +61,7 @@ function(add_cargo_build_target package_name)
         COMMAND ${CMAKE_COMMAND} -E env ${_envs} RUSTFLAGS=${RUSTFLAGS}
             ${MT_SCRIPT_DIR}/cargo_build_ex.sh -p ${package_name}
             --target-dir ${MTEE_TARGET_DIR} ${CARGO_BUILD_FLAGS} ${MTEE_EXTRA_CARGO_FLAGS}
-            && cp ${MTEE_TARGET_DIR}/${TARGET}/${package_name} ${MESATEE_BIN_DIR}
+            && cp ${MTEE_TARGET_DIR}/${TARGET}/${package_name} ${_copy_dir}
         ${_depends}
         COMMENT "Building ${_target_name}"
         WORKING_DIRECTORY ${MTEE_TOML_DIR}
@@ -99,7 +105,7 @@ function(add_cargo_build_dylib_target package_name)
         COMMAND ${CMAKE_COMMAND} -E env ${_envs} RUSTFLAGS=${RUSTFLAGS}
             ${MT_SCRIPT_DIR}/cargo_build_ex.sh -p ${package_name}
             --target-dir ${MTEE_TARGET_DIR} ${CARGO_BUILD_FLAGS} ${MTEE_EXTRA_CARGO_FLAGS}
-            && cp ${MTEE_TARGET_DIR}/${TARGET}/lib${package_name}.so ${MESATEE_BIN_DIR}
+            && cp ${MTEE_TARGET_DIR}/${TARGET}/lib${package_name}.so ${MESATEE_LIB_INSTALL_DIR}
         ${_depends}
         COMMENT "Building ${_target_name} as a dynamic library"
         WORKING_DIRECTORY ${MTEE_TOML_DIR}
@@ -171,7 +177,7 @@ endfunction()
 function(generate_env_file)
     set(envs ${MESATEE_COMMON_ENVS})
     list(FILTER envs INCLUDE REGEX "MESATEE_PROJECT_ROOT|MESATEE_CFG_DIR|\
-MESATEE_BUILD_CFG_DIR|MESATEE_BIN_DIR|MESATEE_OUT_DIR|MESATEE_AUDITORS_DIR")
+MESATEE_BUILD_CFG_DIR|MESATEE_OUT_DIR|MESATEE_AUDITORS_DIR")
     # add extra env vars
     list(APPEND envs "MESATEE_TEST_MODE=1" "RUST_LOG=info" "RUST_BACKTRACE=1")
     join_string("${envs}" "\nexport " env_file)
diff --git a/cmake/UtilTargets.cmake b/cmake/UtilTargets.cmake
index d2c446e..25367ba 100644
--- a/cmake/UtilTargets.cmake
+++ b/cmake/UtilTargets.cmake
@@ -37,7 +37,7 @@ add_custom_target(cov-clean
 
 # add folders for "clean" target
 set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-   "${MESATEE_BIN_DIR}"
+   "${MESATEE_INSTALL_DIR}"
    "${MESATEE_OUT_DIR}"
    "${MESATEE_TARGET_DIR}")
 
diff --git a/cmake/scripts/gen_enclave_sig.sh b/cmake/scripts/gen_enclave_sig.sh
index eca7b6b..d9c119e 100755
--- a/cmake/scripts/gen_enclave_sig.sh
+++ b/cmake/scripts/gen_enclave_sig.sh
@@ -1,10 +1,11 @@
 #!/bin/bash
-if [ -z "$MESATEE_OUT_DIR" ] || [ -z "${MESATEE_AUDITORS_DIR}" ]; then
-    echo "Please set MESATEE_OUT_DIR and MESATEE_AUDITORS_DIR";
-    exit -1
-fi
+set -e
+REQUIRED_ENVS=("MESATEE_OUT_DIR" "MESATEE_AUDITORS_DIR" "MESATEE_SERVICE_INSTALL_DIR")
+for var in "${REQUIRED_ENVS[@]}"; do
+    [ -z "${!var}" ] && echo "Please set ${var}" && exit -1
+done
 
-cd ${MESATEE_OUT_DIR} && cat *_enclave_info.txt > enclave_info.txt
+cd ${MESATEE_OUT_DIR} && cat *_enclave_info.txt > ${MESATEE_SERVICE_INSTALL_DIR}/enclave_info.txt
 
 AUDITOR_PATHS=$(find ${MESATEE_AUDITORS_DIR} -mindepth 1 -maxdepth 1 -type d)
 for auditor_path in ${AUDITOR_PATHS}; do
@@ -12,5 +13,5 @@ auditor=$(basename ${auditor_path})
 openssl dgst -sha256 \
         -sign ${MESATEE_AUDITORS_DIR}/${auditor}/${auditor}.private.pem \
         -out ${MESATEE_AUDITORS_DIR}/${auditor}/${auditor}.sign.sha256 \
-        ${MESATEE_PROJECT_ROOT}/out/enclave_info.txt;
+        ${MESATEE_SERVICE_INSTALL_DIR}/enclave_info.txt;
 done
diff --git a/cmake/scripts/prep.sh b/cmake/scripts/prep.sh
index 2be944e..0d9abb1 100755
--- a/cmake/scripts/prep.sh
+++ b/cmake/scripts/prep.sh
@@ -1,15 +1,18 @@
 #!/bin/bash
 set -e
-REQUIRED_ENVS=("CMAKE_SOURCE_DIR" "CMAKE_BINARY_DIR" "MESATEE_BIN_DIR"
+REQUIRED_ENVS=("CMAKE_SOURCE_DIR" "CMAKE_BINARY_DIR" 
 "MESATEE_OUT_DIR" "MESATEE_TARGET_DIR" "RUSTUP_TOOLCHAIN" "MESAPY_VERSION"
 "SGX_EDGER8R" "MT_EDL_FILE" "SGX_SDK" "RUST_SGX_SDK" "CMAKE_C_COMPILER"
 "CMAKE_AR" "SGX_UNTRUSTED_CFLAGS" "SGX_TRUSTED_CFLAGS" "MT_SCRIPT_DIR")
+
 for var in "${REQUIRED_ENVS[@]}"; do
     [ -z "${!var}" ] && echo "Please set ${var}" && exit -1
 done
 
 ${MT_SCRIPT_DIR}/setup_cmake_tomls ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} 
-mkdir -p ${MESATEE_BIN_DIR} ${MESATEE_OUT_DIR} ${MESATEE_TARGET_DIR}
+mkdir -p ${MESATEE_OUT_DIR} ${MESATEE_TARGET_DIR} ${MESATEE_EXAMPLE_INSTALL_DIR} ${MESATEE_SERVICE_INSTALL_DIR} ${MESATEE_LIB_INSTALL_DIR} ${MESATEE_SERVICE_INSTALL_DIR}/auditors
+# copy auditors to install directory to make it easy to package all built things
+cp -RT ${CMAKE_SOURCE_DIR}/auditors/ ${MESATEE_SERVICE_INSTALL_DIR}/auditors/
 # create the following symlinks to make remapped paths accessible and avoid repeated building
 mkdir -p /tmp/mesatee_symlinks
 ln -snf ${HOME}/.cargo /tmp/mesatee_symlinks/cargo_home
diff --git a/cmake/scripts/sgx_link_sign.sh b/cmake/scripts/sgx_link_sign.sh
index a0c46a6..82c49e2 100755
--- a/cmake/scripts/sgx_link_sign.sh
+++ b/cmake/scripts/sgx_link_sign.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 set -e
 REQUIRED_ENVS=("TOOLCHAIN_DEPS_DIR" "CMAKE_C_COMPILER" "CUR_MODULE_NAME" "CUR_MODULE_PATH"
-"MESATEE_BIN_DIR" "MESATEE_OUT_DIR" "MESATEE_PROJECT_ROOT" "Service_Library_Name"
+"MESATEE_SERVICE_INSTALL_DIR" "MESATEE_OUT_DIR" "MESATEE_PROJECT_ROOT" "Service_Library_Name"
 "SGX_COMMON_CFLAGS" "SGX_ENCLAVE_SIGNER" "SGX_LIBRARY_PATH" "TARGET" "Trts_Library_Name"
 "TRUSTED_TARGET_DIR")
 for var in "${REQUIRED_ENVS[@]}"; do
@@ -10,7 +10,7 @@ done
 
 LIBENCLAVE_PATH="${TRUSTED_TARGET_DIR}/${TARGET}/lib${CUR_MODULE_NAME}_enclave.a"
 CONFIG_PATH="${MESATEE_PROJECT_ROOT}/${CUR_MODULE_PATH}/sgx_trusted_lib/Enclave.config.xml"
-SIGNED_PATH="${MESATEE_BIN_DIR}/${CUR_MODULE_NAME}.enclave.signed.so"
+SIGNED_PATH="${MESATEE_SERVICE_INSTALL_DIR}/${CUR_MODULE_NAME}.enclave.signed.so"
 CUR_ENCLAVE_INFO_PATH="${MESATEE_OUT_DIR}/${CUR_MODULE_NAME}_enclave_info.txt"
 if [ ! "$LIBENCLAVE_PATH" -nt "$SIGNED_PATH" ] \
     && [ ! "$CONFIG_PATH" -nt "$SIGNED_PATH" ] \
@@ -35,7 +35,7 @@ ${CMAKE_C_COMPILER} libEnclave_t.o -o \
     -Wl,--version-script=${TOOLCHAIN_DEPS_DIR}/Enclave.lds
 ${SGX_ENCLAVE_SIGNER} sign -key ${TOOLCHAIN_DEPS_DIR}/Enclave_private.pem \
     -enclave ${CUR_MODULE_NAME}.enclave.so \
-    -out ${MESATEE_BIN_DIR}/${CUR_MODULE_NAME}.enclave.signed.so \
+    -out ${MESATEE_SERVICE_INSTALL_DIR}/${CUR_MODULE_NAME}.enclave.signed.so \
     -config ${MESATEE_PROJECT_ROOT}/${CUR_MODULE_PATH}/sgx_trusted_lib/Enclave.config.xml \
     -dumpfile ${CUR_MODULE_NAME}.enclave.meta.txt > /dev/null 2>&1
 echo ${CUR_MODULE_NAME} > ${CUR_MODULE_NAME}_enclave_info.txt
diff --git a/cmake/scripts/sgx_test.sh b/cmake/scripts/sgx_test.sh
index 3135bad..6f0f45c 100755
--- a/cmake/scripts/sgx_test.sh
+++ b/cmake/scripts/sgx_test.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 set -e
-if [ -z "${MESATEE_PROJECT_ROOT}" ] || [ -z "${MESATEE_BIN_DIR}" ] \
+if [ -z "${MESATEE_PROJECT_ROOT}" ] \
 || [ -z "${SGX_SDK}" ] || [ -z "${SGX_MODE}" ]; then
-    echo "Please set MESATEE_PROJECT_ROOT, MESATEE_BIN_DIR, SGX_SDK and SGX_MODE";
+    echo "Please set MESATEE_PROJECT_ROOT, SGX_SDK and SGX_MODE";
     exit -1
 fi
 
diff --git a/config.toml b/config.toml
index ee7dddd..81ec67d 100644
--- a/config.toml
+++ b/config.toml
@@ -62,7 +62,7 @@ key = { env = "IAS_KEY" }
 # This section configures the auditors.
 # This is a required section.
 [audited_enclave_config]
-enclave_info = { path = "out/enclave_info.txt" }
-signature_a = { path = "auditors/godzilla/godzilla.sign.sha256" }
-signature_b = { path = "auditors/optimus_prime/optimus_prime.sign.sha256" }
-signature_c = { path = "auditors/albus_dumbledore/albus_dumbledore.sign.sha256" }
+enclave_info = { path = "release/service/enclave_info.txt" }
+signature_a = { path = "release/service/auditors/godzilla/godzilla.sign.sha256" }
+signature_b = { path = "release/service/auditors/optimus_prime/optimus_prime.sign.sha256" }
+signature_c = { path = "release/service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256" }
diff --git a/docs/how_to_build.md b/docs/how_to_build.md
index 9c83758..3626ba7 100644
--- a/docs/how_to_build.md
+++ b/docs/how_to_build.md
@@ -93,7 +93,6 @@ help set the variables. Below is the description for the environment variables:
 * ``MESATEE_PROJECT_ROOT``: MesaTEE project root directory
 * ``MESATEE_CFG_DIR``: directory containing the runtime config
 * ``MESATEE_BUILD_CFG_DIR``: directory containing the compile time config
-* ``MESATEE_BIN_DIR``: directory that you want to place the generated binaries
 * ``MESATEE_AUDITORS_DIR``: directory containing auditors' public keys and endorsement to TEE enclaves (digital signatures)
 * ``MESATEE_TEST_MODE``: whether executing in testing mode
 * ``RUST_LOG``: logging levels
diff --git a/examples/dbscan/dbscan_demo.sh b/examples/dbscan/dbscan_demo.sh
index c07c2c9..b7bbd56 100755
--- a/examples/dbscan/dbscan_demo.sh
+++ b/examples/dbscan/dbscan_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./dbscan
 cd $BIN_DIR
 
diff --git a/examples/dbscan/src/main.rs b/examples/dbscan/src/main.rs
index 4eb516a..413b866 100644
--- a/examples/dbscan/src/main.rs
+++ b/examples/dbscan/src/main.rs
@@ -47,16 +47,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -81,7 +81,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh b/examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh
index 3d73e7a..650b11f 100755
--- a/examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh
+++ b/examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./gaussian_mixture_model
 cd $BIN_DIR
 
diff --git a/examples/gaussian_mixture_model/src/main.rs b/examples/gaussian_mixture_model/src/main.rs
index 9c933f6..26dd17d 100644
--- a/examples/gaussian_mixture_model/src/main.rs
+++ b/examples/gaussian_mixture_model/src/main.rs
@@ -51,16 +51,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -90,7 +90,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/gaussian_processes/gaussian_processes_demo.sh b/examples/gaussian_processes/gaussian_processes_demo.sh
index a05bfce..54a3671 100755
--- a/examples/gaussian_processes/gaussian_processes_demo.sh
+++ b/examples/gaussian_processes/gaussian_processes_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./gaussian_processes
 cd $BIN_DIR
 
diff --git a/examples/gaussian_processes/src/main.rs b/examples/gaussian_processes/src/main.rs
index ce9643e..f30ada5 100644
--- a/examples/gaussian_processes/src/main.rs
+++ b/examples/gaussian_processes/src/main.rs
@@ -56,16 +56,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -97,7 +97,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/gbdt/gbdt_demo.sh b/examples/gbdt/gbdt_demo.sh
index 09f983f..e7e77b7 100755
--- a/examples/gbdt/gbdt_demo.sh
+++ b/examples/gbdt/gbdt_demo.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./gbdt
 cd $BIN_DIR
 
diff --git a/examples/gbdt/src/main.rs b/examples/gbdt/src/main.rs
index 41e498b..52307a3 100644
--- a/examples/gbdt/src/main.rs
+++ b/examples/gbdt/src/main.rs
@@ -97,20 +97,20 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let args: Vec<String> = env::args().collect();
diff --git a/examples/gen_linear_model/gen_linear_model_demo.sh b/examples/gen_linear_model/gen_linear_model_demo.sh
index ee1dd3d..50a750c 100755
--- a/examples/gen_linear_model/gen_linear_model_demo.sh
+++ b/examples/gen_linear_model/gen_linear_model_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./gen_linear_model
 cd $BIN_DIR
 
diff --git a/examples/gen_linear_model/src/main.rs b/examples/gen_linear_model/src/main.rs
index 726562d..0aaa27f 100644
--- a/examples/gen_linear_model/src/main.rs
+++ b/examples/gen_linear_model/src/main.rs
@@ -56,16 +56,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -97,7 +97,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/image_resizing/image_resize_demo.sh b/examples/image_resizing/image_resize_demo.sh
index 5b3b121..a5d93b1 100755
--- a/examples/image_resizing/image_resize_demo.sh
+++ b/examples/image_resizing/image_resize_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 
 BIN=./image_resizing
 
diff --git a/examples/image_resizing/src/main.rs b/examples/image_resizing/src/main.rs
index b9fa27c..3a30b2a 100644
--- a/examples/image_resizing/src/main.rs
+++ b/examples/image_resizing/src/main.rs
@@ -49,19 +49,19 @@ pub(crate) struct ImageResizePayload {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
diff --git a/examples/kmeans/kmeans_demo.sh b/examples/kmeans/kmeans_demo.sh
index fba6137..433156e 100755
--- a/examples/kmeans/kmeans_demo.sh
+++ b/examples/kmeans/kmeans_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./kmeans
 cd $BIN_DIR
 
diff --git a/examples/kmeans/src/main.rs b/examples/kmeans/src/main.rs
index dc5611d..477e23c 100644
--- a/examples/kmeans/src/main.rs
+++ b/examples/kmeans/src/main.rs
@@ -50,16 +50,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -82,7 +82,7 @@ fn main() {
     };
     let input_string = serde_json::to_string(&input_payload).unwrap();
 
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
     let mesatee = Mesatee::new(
diff --git a/examples/lin_reg/lin_reg_demo.sh b/examples/lin_reg/lin_reg_demo.sh
index 6ffa7ef..208ee9a 100755
--- a/examples/lin_reg/lin_reg_demo.sh
+++ b/examples/lin_reg/lin_reg_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./lin_reg
 cd $BIN_DIR
 
diff --git a/examples/lin_reg/src/main.rs b/examples/lin_reg/src/main.rs
index df5fb28..1f3f9c4 100644
--- a/examples/lin_reg/src/main.rs
+++ b/examples/lin_reg/src/main.rs
@@ -56,16 +56,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -97,7 +97,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/logistic_reg/logistic_reg_demo.sh b/examples/logistic_reg/logistic_reg_demo.sh
index d0d3dff..64f57ae 100755
--- a/examples/logistic_reg/logistic_reg_demo.sh
+++ b/examples/logistic_reg/logistic_reg_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./logistic_reg
 cd $BIN_DIR
 
diff --git a/examples/logistic_reg/src/main.rs b/examples/logistic_reg/src/main.rs
index 2fdb7e0..7449689 100644
--- a/examples/logistic_reg/src/main.rs
+++ b/examples/logistic_reg/src/main.rs
@@ -78,20 +78,20 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let args_string: Vec<String> = env::args().collect();
diff --git a/examples/naive_bayes/naive_bayes_demo.sh b/examples/naive_bayes/naive_bayes_demo.sh
index bb95481..8e9476f 100755
--- a/examples/naive_bayes/naive_bayes_demo.sh
+++ b/examples/naive_bayes/naive_bayes_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./naive_bayes
 cd $BIN_DIR
 
diff --git a/examples/naive_bayes/src/main.rs b/examples/naive_bayes/src/main.rs
index e1b6451..82bca05 100644
--- a/examples/naive_bayes/src/main.rs
+++ b/examples/naive_bayes/src/main.rs
@@ -51,16 +51,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -89,7 +89,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/neural_net/neural_net_demo.sh b/examples/neural_net/neural_net_demo.sh
index 5d726fd..b010913 100755
--- a/examples/neural_net/neural_net_demo.sh
+++ b/examples/neural_net/neural_net_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./neural_net
 cd $BIN_DIR
 
diff --git a/examples/neural_net/src/main.rs b/examples/neural_net/src/main.rs
index a375f43..e481a63 100644
--- a/examples/neural_net/src/main.rs
+++ b/examples/neural_net/src/main.rs
@@ -55,16 +55,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -96,7 +96,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/online_decrypt/online_decrypt_demo.sh b/examples/online_decrypt/online_decrypt_demo.sh
index 9d55749..fcdfd73 100755
--- a/examples/online_decrypt/online_decrypt_demo.sh
+++ b/examples/online_decrypt/online_decrypt_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./online_decrypt
 cd $BIN_DIR
 
diff --git a/examples/online_decrypt/src/main.rs b/examples/online_decrypt/src/main.rs
index 60f5b41..bc6e787 100644
--- a/examples/online_decrypt/src/main.rs
+++ b/examples/online_decrypt/src/main.rs
@@ -142,19 +142,19 @@ fn online_decrypt(
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
diff --git a/examples/private_join_and_compute/four_party_bench.sh b/examples/private_join_and_compute/four_party_bench.sh
index 65c1ff6..3e19dde 100755
--- a/examples/private_join_and_compute/four_party_bench.sh
+++ b/examples/private_join_and_compute/four_party_bench.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./private_join_and_compute
 
 cd $BIN_DIR
diff --git a/examples/private_join_and_compute/four_party_demo.sh b/examples/private_join_and_compute/four_party_demo.sh
index 4447e20..a976fea 100755
--- a/examples/private_join_and_compute/four_party_demo.sh
+++ b/examples/private_join_and_compute/four_party_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./private_join_and_compute
 
 cd $BIN_DIR
diff --git a/examples/private_join_and_compute/src/main.rs b/examples/private_join_and_compute/src/main.rs
index b43f927..390e11f 100644
--- a/examples/private_join_and_compute/src/main.rs
+++ b/examples/private_join_and_compute/src/main.rs
@@ -124,19 +124,19 @@ fn get_result(info: &MesateeEnclaveInfo, user_id: &str, user_token: &str, task_i
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
diff --git a/examples/private_join_and_compute/three_party_demo.sh b/examples/private_join_and_compute/three_party_demo.sh
index e799921..9cd590b 100755
--- a/examples/private_join_and_compute/three_party_demo.sh
+++ b/examples/private_join_and_compute/three_party_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./private_join_and_compute
 
 cd $BIN_DIR
diff --git a/examples/py_file/py_file.sh b/examples/py_file/py_file.sh
index d7c33aa..54f3988 100755
--- a/examples/py_file/py_file.sh
+++ b/examples/py_file/py_file.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./py_file
 cd $BIN_DIR
 
diff --git a/examples/py_file/src/main.rs b/examples/py_file/src/main.rs
index 981e150..b62090f 100644
--- a/examples/py_file/src/main.rs
+++ b/examples/py_file/src/main.rs
@@ -29,19 +29,19 @@ lazy_static! {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
     let args_string: Vec<String> = env::args().collect();
@@ -56,7 +56,7 @@ fn main() {
 
     let mesatee = Mesatee::new(&info, USER_ID, USER_TOKEN, *TMS_ADDR, *TDFS_ADDR).unwrap();
     let file_id = mesatee
-        .upload_file("../examples/py_file/data/1.txt")
+        .upload_file("../../examples/py_file/data/1.txt")
         .unwrap();
     let task = mesatee
         .create_task_with_files(FUNCTION_NAME, &[&file_id])
diff --git a/examples/py_logistic_reg/py_logistic_reg.sh b/examples/py_logistic_reg/py_logistic_reg.sh
index 39eac28..fd43407 100755
--- a/examples/py_logistic_reg/py_logistic_reg.sh
+++ b/examples/py_logistic_reg/py_logistic_reg.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./py_logistic_reg
 cd $BIN_DIR
 
diff --git a/examples/py_logistic_reg/src/main.rs b/examples/py_logistic_reg/src/main.rs
index b1e60bb..bade915 100644
--- a/examples/py_logistic_reg/src/main.rs
+++ b/examples/py_logistic_reg/src/main.rs
@@ -29,19 +29,19 @@ lazy_static! {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
     let args_string: Vec<String> = env::args().collect();
@@ -56,10 +56,10 @@ fn main() {
 
     let mesatee = Mesatee::new(&info, USER_ID, USER_TOKEN, *TMS_ADDR, *TDFS_ADDR).unwrap();
     let train_file_id = mesatee
-        .upload_file("../examples/py_logistic_reg/data/train.txt")
+        .upload_file("../../examples/py_logistic_reg/data/train.txt")
         .unwrap();
     let predict_file_id = mesatee
-        .upload_file("../examples/py_logistic_reg/data/predict.txt")
+        .upload_file("../../examples/py_logistic_reg/data/predict.txt")
         .unwrap();
 
     let file_ids: [&str; 2] = [train_file_id.as_str(), predict_file_id.as_str()];
diff --git a/examples/py_matrix_multiply/py_matrix_multiply.sh b/examples/py_matrix_multiply/py_matrix_multiply.sh
index c242a09..2f7a3a6 100755
--- a/examples/py_matrix_multiply/py_matrix_multiply.sh
+++ b/examples/py_matrix_multiply/py_matrix_multiply.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./py_matrix_multiply
 cd $BIN_DIR
 
diff --git a/examples/py_matrix_multiply/src/main.rs b/examples/py_matrix_multiply/src/main.rs
index 8e44fa5..af2aeca 100644
--- a/examples/py_matrix_multiply/src/main.rs
+++ b/examples/py_matrix_multiply/src/main.rs
@@ -29,19 +29,19 @@ lazy_static! {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
     let args_string: Vec<String> = env::args().collect();
diff --git a/examples/quickstart/run.sh b/examples/quickstart/run.sh
index 064c6b2..4a4db73 100755
--- a/examples/quickstart/run.sh
+++ b/examples/quickstart/run.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 cd $BIN_DIR
 
 # prepare test data
diff --git a/examples/quickstart/src/main.rs b/examples/quickstart/src/main.rs
index 630e8cd..30788ea 100644
--- a/examples/quickstart/src/main.rs
+++ b/examples/quickstart/src/main.rs
@@ -77,19 +77,19 @@ fn main() {
     // Load auditors' public keys and endorsement to TEE enclaves (digital signatures)
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
diff --git a/examples/quickstart_c/main.c b/examples/quickstart_c/main.c
index 17fcd26..4213d85 100644
--- a/examples/quickstart_c/main.c
+++ b/examples/quickstart_c/main.c
@@ -56,19 +56,19 @@ int main() {
 
   mesatee_auditor_set_t *auditors = mesatee_auditor_set_new();
   mesatee_auditor_set_add_auditor(auditors,
-                                  "../auditors/godzilla/godzilla.public.der",
-                                  "../auditors/godzilla/godzilla.sign.sha256");
+                                  "../service/auditors/godzilla/godzilla.public.der",
+                                  "../service/auditors/godzilla/godzilla.sign.sha256");
   mesatee_auditor_set_add_auditor(
-      auditors, "../auditors/optimus_prime/optimus_prime.public.der",
-      "../auditors/optimus_prime/optimus_prime.sign.sha256");
+      auditors, "../service/auditors/optimus_prime/optimus_prime.public.der",
+      "../service/auditors/optimus_prime/optimus_prime.sign.sha256");
   mesatee_auditor_set_add_auditor(
-      auditors, "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-      "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256");
+      auditors, "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+      "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256");
 
   assert(auditors != NULL);
 
   mesatee_enclave_info_t *enclave_info =
-      mesatee_enclave_info_load(auditors, "../out/enclave_info.txt");
+      mesatee_enclave_info_load(auditors, "../service/enclave_info.txt");
 
   assert(enclave_info != NULL);
 
diff --git a/examples/quickstart_c/run.sh b/examples/quickstart_c/run.sh
index b211700..3dab233 100755
--- a/examples/quickstart_c/run.sh
+++ b/examples/quickstart_c/run.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 cd $BIN_DIR
 
 # prepare test data
diff --git a/examples/rsa_sign/rsa_sign.sh b/examples/rsa_sign/rsa_sign.sh
index 739a1b3..c74fdcd 100755
--- a/examples/rsa_sign/rsa_sign.sh
+++ b/examples/rsa_sign/rsa_sign.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./rsa_sign
 cd $BIN_DIR
 
diff --git a/examples/rsa_sign/src/main.rs b/examples/rsa_sign/src/main.rs
index d3963b2..3b1fdf8 100644
--- a/examples/rsa_sign/src/main.rs
+++ b/examples/rsa_sign/src/main.rs
@@ -60,19 +60,19 @@ fn sign(
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
 
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
 
diff --git a/examples/svm/src/main.rs b/examples/svm/src/main.rs
index 1b0c621..5d3a971 100644
--- a/examples/svm/src/main.rs
+++ b/examples/svm/src/main.rs
@@ -56,16 +56,16 @@ fn print_usage() {
 fn main() {
     let auditors = vec![
         (
-            "../auditors/godzilla/godzilla.public.der",
-            "../auditors/godzilla/godzilla.sign.sha256",
+            "../service/auditors/godzilla/godzilla.public.der",
+            "../service/auditors/godzilla/godzilla.sign.sha256",
         ),
         (
-            "../auditors/optimus_prime/optimus_prime.public.der",
-            "../auditors/optimus_prime/optimus_prime.sign.sha256",
+            "../service/auditors/optimus_prime/optimus_prime.public.der",
+            "../service/auditors/optimus_prime/optimus_prime.sign.sha256",
         ),
         (
-            "../auditors/albus_dumbledore/albus_dumbledore.public.der",
-            "../auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.public.der",
+            "../service/auditors/albus_dumbledore/albus_dumbledore.sign.sha256",
         ),
     ];
 
@@ -97,7 +97,7 @@ fn main() {
     };
 
     let input_string = serde_json::to_string(&input_payload).unwrap();
-    let enclave_info_file_path = "../out/enclave_info.txt";
+    let enclave_info_file_path = "../service/enclave_info.txt";
     let mesatee_enclave_info = MesateeEnclaveInfo::load(auditors, enclave_info_file_path).unwrap();
     let mesatee = Mesatee::new(
         &mesatee_enclave_info,
diff --git a/examples/svm/svm_demo.sh b/examples/svm/svm_demo.sh
index 7029587..1635d00 100755
--- a/examples/svm/svm_demo.sh
+++ b/examples/svm/svm_demo.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-BIN_DIR=$SCRIPT_DIR/../../bin
+BIN_DIR=$SCRIPT_DIR/../../release/example
 BIN=./svm
 cd $BIN_DIR
 
diff --git a/mesatee_config/build.rs b/mesatee_config/build.rs
index d5cddcf..9e9b857 100644
--- a/mesatee_config/build.rs
+++ b/mesatee_config/build.rs
@@ -21,7 +21,8 @@ fn main() {
     let dest_file = Path::new(&out_dir)
         .to_path_buf()
         .join("gen_build_config.rs");
-    let mut cmd = Command::new("../bin/config_gen");
+    // the hardcoded path is a little ugly here, but makes it easy to debug without cmake
+    let mut cmd = Command::new("../release/example/config_gen");
     cmd.arg(dest_file);
     match cmd.status() {
         Ok(status) => {
diff --git a/tests/functional_test.sh b/tests/functional_test.sh
index 963c60f..2db6f47 100755
--- a/tests/functional_test.sh
+++ b/tests/functional_test.sh
@@ -1,10 +1,11 @@
 #!/bin/bash
 
 trap "pkill -2 -P $$; wait" SIGINT SIGTERM EXIT
-cd ../bin
+
+cd ../release/service
 
 # prepare test data
-cp -r ../tests/integration_test/test_data ../bin/
+cp -r ../../tests/integration_test/test_data ./
 
 # check port
 if lsof -i :6016; then
diff --git a/tests/integration_test.sh b/tests/integration_test.sh
index 6b17e93..6270ef4 100755
--- a/tests/integration_test.sh
+++ b/tests/integration_test.sh
@@ -2,10 +2,10 @@
 
 trap "pkill -2 -P $$; wait" SIGINT SIGTERM EXIT
 
-cd ../bin
+cd ../release/service
 
 # prepare test data
-cp -r ../tests/integration_test/test_data .
+cp -r ../../tests/integration_test/test_data ./
 
 # check ports
 for port in 5554 5555 3444 6016 5065 5066; do
@@ -49,63 +49,63 @@ wait_service "tms" 5555 30
 wait_service "fns" 3444 30
 
 echo "[+] run integration_test"
-./integration_test 2>&1 | tee integration_test.log
+../example/integration_test 2>&1 | tee integration_test.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 
 echo "[+] run three_party_demo"
-../examples/private_join_and_compute/three_party_demo.sh > /dev/null
+../../examples/private_join_and_compute/three_party_demo.sh > /dev/null
 [ $? -eq 0 ] || exit $?
 echo "[+] run four_party_demo"
-../examples/private_join_and_compute/four_party_demo.sh > /dev/null
+../../examples/private_join_and_compute/four_party_demo.sh > /dev/null
 [ $? -eq 0 ] || exit $?
 echo "[+] run image_resize_demo"
-../examples/image_resizing/image_resize_demo.sh 2>&1 | tee image_resize.log
+../../examples/image_resizing/image_resize_demo.sh 2>&1 | tee image_resize.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run online_decrypt_demo"
-../examples/online_decrypt/online_decrypt_demo.sh 2>&1 | tee decrypt.log
+../../examples/online_decrypt/online_decrypt_demo.sh 2>&1 | tee decrypt.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run rsa_sign"
-../examples/rsa_sign/rsa_sign.sh 2>&1 | tee rsa_sign.log
+../../examples/rsa_sign/rsa_sign.sh 2>&1 | tee rsa_sign.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run py_matrix_multiply"
-../examples/py_matrix_multiply/py_matrix_multiply.sh 2>&1 | tee py_matrix_multiply.log
+../../examples/py_matrix_multiply/py_matrix_multiply.sh 2>&1 | tee py_matrix_multiply.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run py_logistic_reg"
-../examples/py_logistic_reg/py_logistic_reg.sh 2>&1 | tee py_logistic_reg.log
+../../examples/py_logistic_reg/py_logistic_reg.sh 2>&1 | tee py_logistic_reg.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run py_file"
-../examples/py_file/py_file.sh 2>&1 | tee py_file.log
+../../examples/py_file/py_file.sh 2>&1 | tee py_file.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run kmeans"
-../examples/kmeans/kmeans_demo.sh 2>&1 | tee kmeans_demo.log
+../../examples/kmeans/kmeans_demo.sh 2>&1 | tee kmeans_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run logistic_reg"
-../examples/logistic_reg/logistic_reg_demo.sh 2>&1 | tee logistic_reg_demo.log
+../../examples/logistic_reg/logistic_reg_demo.sh 2>&1 | tee logistic_reg_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run lin_reg"
-../examples/lin_reg/lin_reg_demo.sh 2>&1 | tee lin_reg_demo.log
+../../examples/lin_reg/lin_reg_demo.sh 2>&1 | tee lin_reg_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run svm"
-../examples/svm/svm_demo.sh 2>&1 | tee svm_demo.log
+../../examples/svm/svm_demo.sh 2>&1 | tee svm_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run gen_linear_model"
-../examples/gen_linear_model/gen_linear_model_demo.sh 2>&1 | tee gen_linear_model_demo.log
+../../examples/gen_linear_model/gen_linear_model_demo.sh 2>&1 | tee gen_linear_model_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run gaussian_mixture_model"
-../examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh 2>&1 | tee gaussian_mixture_model_demo.log
+../../examples/gaussian_mixture_model/gaussian_mixture_model_demo.sh 2>&1 | tee gaussian_mixture_model_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run gaussian_processes"
-../examples/gaussian_processes/gaussian_processes_demo.sh 2>&1 | tee gaussian_processes_demo.log
+../../examples/gaussian_processes/gaussian_processes_demo.sh 2>&1 | tee gaussian_processes_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run dbscan"
-../examples/dbscan/dbscan_demo.sh 2>&1 | tee dbscan_demo.log
+../../examples/dbscan/dbscan_demo.sh 2>&1 | tee dbscan_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run neural_net"
-../examples/neural_net/neural_net_demo.sh 2>&1 | tee neural_net_demo.log
+../../examples/neural_net/neural_net_demo.sh 2>&1 | tee neural_net_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run naive_bayes"
-../examples/naive_bayes/naive_bayes_demo.sh 2>&1 | tee naive_bayes_demo.log
+../../examples/naive_bayes/naive_bayes_demo.sh 2>&1 | tee naive_bayes_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
 echo "[+] run gbdt"
-../examples/gbdt/gbdt_demo.sh 2>&1 | tee gbdt_demo.log
+../../examples/gbdt/gbdt_demo.sh 2>&1 | tee gbdt_demo.log
 [ ${PIPESTATUS[0]} -eq 0 ] || exit ${PIPESTATUS[0]}
diff --git a/tests/integration_test/src/wasm/mod.rs b/tests/integration_test/src/wasm/mod.rs
index c0934d2..6386fcc 100644
--- a/tests/integration_test/src/wasm/mod.rs
+++ b/tests/integration_test/src/wasm/mod.rs
@@ -39,78 +39,78 @@ pub fn test_one_wasmi(wast_file: &str) {
 
 pub fn test_wasmi() {
     let wast_list = vec![
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/int_exprs.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/conversions.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/nop.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_memory.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/call.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-import-module.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/labels.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/align.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory_trap.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/globals.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/comments.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/get_local.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_literals.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/elem.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64_bitwise.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/custom_section.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/inline-module.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/call_indirect.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/break-drop.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unreached-invalid.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-import-field.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/loop.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br_if.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/select.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unwind.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/binary.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/tee_local.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/custom.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/start.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_misc.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/stack.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32_cmp.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/i64.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/const.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unreachable.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/switch.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/resizing.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/i32.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64_cmp.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/int_literals.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br_table.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/traps.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/return.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/type.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/fac.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/set_local.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/func.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32_bitwise.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_exprs.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/linking.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/skip-stack-guard-page.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/names.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/address.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory_redundancy.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/block.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-invalid-encoding.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/left-to-right.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/forward.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/typecheck.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/store_retval.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/imports.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/exports.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/endianness.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/func_ptrs.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/if.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/token.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/data.wast",
-        "../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-custom-section-id.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/int_exprs.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/conversions.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/nop.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_memory.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/call.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-import-module.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/labels.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/align.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory_trap.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/globals.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/comments.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/get_local.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_literals.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/elem.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64_bitwise.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/custom_section.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/inline-module.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/call_indirect.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/break-drop.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unreached-invalid.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-import-field.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/loop.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br_if.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/select.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unwind.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/binary.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/tee_local.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/custom.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/start.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_misc.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/stack.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32_cmp.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/i64.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/const.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/unreachable.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/switch.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/resizing.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/i32.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64_cmp.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/int_literals.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/br_table.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/traps.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/return.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f64.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/type.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/fac.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/set_local.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/func.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/f32_bitwise.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/float_exprs.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/linking.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/skip-stack-guard-page.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/names.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/address.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/memory_redundancy.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/block.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-invalid-encoding.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/left-to-right.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/forward.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/typecheck.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/store_retval.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/imports.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/exports.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/endianness.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/func_ptrs.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/if.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/token.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/data.wast",
+        "../../third_party/rust-sgx-sdk/samplecode/wasmi/test_input/utf8-custom-section-id.wast",
     ];
     for wfile in wast_list {
         test_one_wasmi(wfile);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org


Mime
View raw message