Skip to content

SDK for Keystone Enclave - ABI/SBI libraries and sample apps

License

Notifications You must be signed in to change notification settings

Eobard26/keystone-sdk

 
 

Repository files navigation

Build SDK and Install

Replace <install directory> with any path that you want SDK to be installed. If not specified, the install directory will be the same as the build directory. <install directory> MUST be different from the source path.

mkdir build
cd build
export KEYSTONE_SDK_DIR=<install_directory>
cmake ..
make
make install

To uninstall,

make uninstall

Ideally, you may need to add the following to your shell rcfile (e.g., .bashrc)

export KEYSTONE_SDK_DIR=<install directory>

Build Examples

In the CMake build directory, run the following:

make examples

This will compile example enclaves in examples directory. All the example enclave packages have suffix .ke.

Format Checking

All code should be formatted correctly before they are merged.

make format

We use clang-format and cpplint for checking format. clang-format auto-formats the code in src, include, tests, and examples directories. cpplint will check C++ format (based on Google C++ coding style) and print out warnings if there are ill-formatted files.

Run Unit Tests

The Keystone SDK uses GoogleTest as a framework to run various tests. The test framework source code is located under tests.

Before you can run the tests, you must install the GoogleTest libaries. There is a setup script under tests/scripts/setup_test.sh which installs the GoogleTest source code and builds the library.

The unit tests will be running on your host machine (not RISC-V QEMU).

In order to run the unit tests, do the following:

make check

About

SDK for Keystone Enclave - ABI/SBI libraries and sample apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 73.2%
  • C++ 22.7%
  • CMake 3.1%
  • Other 1.0%