This repo serves as the development repo for the Exeuction Service and Execution Enclave for NTC.
The app directoy represents the execution service.
The enclave directory represents the execution enclave.
The get-**-wasm files represent rust code binaries.
The wasmi-impl represents a wasm binary compiler to convert and run the rust binaries to wasm code.
- Operating system:
- Recommended: Ubuntu 20.04 (LTS)
- Packages:
makeclang(recommended) orgcccmakeautoconflibtool
- Snaps:
docker
- Rust toolchain:
- See [#rust-ecosystem]
Install rustup as described at rustup.rs. If you did
not explicitly select nightly as your default toolchain then do so now
$ rustup install nightly
followed by
$ rustup default nightly
You will now have the cargo build tool, as well as the nigtly rustc compiler
installed on your system and may now continue setting up your environment.
NOTE: If you opted to install gcc as your compiler, make sure you run
export CC=gcc; export CXX=g++
Otherwise you may safely continue.
The Rust and Intel SGX SDKs need to be installed and the relevant environment variables need to be set. In order to facilitate this, we use the convenience scripts provided at rust-sgx-sdk-env.
- Make sure docker is installed and the
dockerdaemon is running, otherwise install following these steps - [docker_install], once installed you can check the docker is up by running this code:$ systemctl start snap.docker.dockerd - In order to run the scripts as a non-root user, follow the docker-postinstall(post-installation instructions) set out in the Docker documentation (note, in particular, that a restart may be necessary).
- Clone the repository at rust-sgx-sdk-env
and
$ git clone https://github.com/PiDelport/rust-sgx-sdk-dev-envcdinto it. - Run the latest "prepare" script:
$ ./prepare-1.1.14-intel-2.15.1.sh - Finally, assuming
bashis the current shell, source the environment file in the top level of the repository:$ source environment
- Before proceeding, make sure your environment is set up properly.
- Clone the project repository
and
$ git clone https://github.com/ntls-io/wasm-exec-sgxcdinto it. - Run
maketo compile the entire project. - To run the main application, change to bin/ and execute the following:
./app - In order to test the provided Wasm binary, change the current directory to
the
wasmi-implsubdirectory and execute the following:cargo test