First Attempt to Run Rust-Sgxfleeting
First attempt to run rust-sgx.
Ok, first install rustup, with the dedicated command line.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Then, follow the instructions on the installation guide page.
The sgx-detect part gives me this
Detecting SGX, this may take a minute... ✔ SGX instruction set ✔ CPU support ✔ CPU configuration ✔ Enclave attributes ✔ Enclave Page Cache SGX features ✘ SGX2 ✘ EXINFO ✘ ENCLV ✘ OVERSUB ✘ KSS Total EPC size: 94.0MiB ✘ Flexible launch control ✔ CPU support ✔ CPU configuration ✘ Able to launch production mode enclave ✔ SGX system software ✔ SGX kernel device (/dev/isgx) ✘ libsgx_enclave_common ✔ AESM service ✔ Able to launch enclaves ✔ Debug mode ✘ Production mode ✔ Production mode (Intel whitelisted) 🕮 SGX system software > Able to launch enclaves > Production mode The enclave could not be launched. This might indicate a problem with FLC. (run with `--verbose` for more details) More information: https://edp.fortanix.com/docs/installation/help/#run-enclave-prod You're all set to start running SGX programs!
Well, most of the parts are ok, and the last message is full of hope.
Great, the hello world works
sam@ns3182689:~$ cargo new --bin hello-world Created binary (application) `hello-world` package sam@ns3182689:~$ cd hello-world/ sam@ns3182689:~/hello-world$ cargo run --target x86_64-fortanix-unknown-sgx Compiling hello-world v0.1.0 (/home/sam/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.55s Running `ftxsgx-runner-cargo target/x86_64-fortanix-unknown-sgx/debug/hello-world` Hello, world!