Rust SDK for Intel SGX (Software Guard Extensions) - A collection of tools and libraries for building secure enclaves in Rust.
- Rust SGX Libraries: Core libraries for developing SGX enclaves
- cargo-sgx: A Cargo subcommand that streamlines SGX enclave development by providing:
- Project initialization with templates (
cargo sgx new
) - Automated enclave building command (
cargo sgx build
) - Seamless integration with the Rust toolchain using custom target
x86_64-unknown-unknown-sgx
- Project initialization with templates (
cargo install --git https://github.com/datachainlab/sgx-sdk-rs --branch main cargo-sgx
Or install from local directory:
cargo install --path ./cargo-sgx
cargo sgx new my-enclave
cd my-enclave
cargo sgx build
sgx-*
- Core SGX libraries (types, ert, trts, tseal, urts, etc.)cargo-sgx/
- Cargo subcommand for SGX developmentsgx-build/
- Build utilities for SGX enclavesunit-test/
- Unit tests for core SGX librariessamples/hello-rust/
- Basic SGX enclave example
- cargo-sgx README - Learn about the cargo-sgx tool
- sgx-build README - Learn about the sgx-build crate
- Rust nightly toolchain
- Intel SGX SDK
- Intel SGX Driver(only for Hardware Mode)
This project is based on the excellent work done by the Apache Teaclave SGX SDK project. We are grateful for their foundational contributions to the Rust SGX ecosystem.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.