From 6d29a5c7c100e8b07b2e519a5c0074a87f3a309e Mon Sep 17 00:00:00 2001 From: zhongjie Date: Tue, 5 Mar 2024 12:13:03 +0800 Subject: [PATCH] rust: add README Signed-off-by: zhongjie --- src/rust/README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/rust/README.md diff --git a/src/rust/README.md b/src/rust/README.md new file mode 100644 index 0000000..0c46df1 --- /dev/null +++ b/src/rust/README.md @@ -0,0 +1,47 @@ +# Rust SDK for CC Trusted API in Confidential VM + +This is the Rust version of our VM SDK to help you using the CC Trusted API in your Rust programs. The sub folder "cctrusted_vm" include all the source code for the VMSDK. The sub folder "sample" includes some commandline examples for your reference. + +# Run CLI Samples + +We can try the CLI samples like this: + +```bash +cd sample + +# get measurement +cargo run --bin cc-sample-measurement + +# get event log +cargo run --bin cc-sample-eventlog + +# get quote +cargo run --bin cc-sample-quote +``` + +Or, after build successfuly, we can also run the CLIs directly: + +```bash +cd sample + +# build the release version +cargo build --release + +# get measurement +target/release/cc-sample-measurement + +# get event log +target/release/cc-sample-eventlog + +# get quote +target/release/cc-sample-quote +``` + +# Run Test + +The test is simple: + +```bash +cd cctrusted_vm +cargo test +``` \ No newline at end of file