This is an automated email from the ASF dual-hosted git repository.

yuanz pushed a commit to branch no-std
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git


The following commit(s) were added to refs/heads/no-std by this push:
     new 95d3767  Add Documentation for no-std
95d3767 is described below

commit 95d37671809078aece3b7aa7542962884e4544bc
Author: Yuan Zhuang <[email protected]>
AuthorDate: Wed May 8 16:47:21 2024 +0800

    Add Documentation for no-std
    
    Acked-by: Joakim Bech <[email protected]>
    Reviewed-by: Sumit Garg <[email protected]>
    Signed-off-by: Yuan Zhuang <[email protected]>
---
 README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 5c0aa53..17cd7ee 100644
--- a/README.md
+++ b/README.md
@@ -14,9 +14,17 @@ TrustZone applications with Rust's standard library (std) 
and many third-party
 libraries (i.e., crates). Teaclave TrustZone SDK is a sub-project of [Apache
 Teaclave (incubating)](https://teaclave.apache.org/).
 
+Teaclave TrustZone SDK provides two development modes for Rust TAs: `no-std` 
+(check out the `no-std` branch) and `std` (check out the `master` branch). 
+We recommend using `no-std` by default. For a detailed comparison, please refer
+to [Comparison](#comparison).
+
 ## Table of Contents
 
-- [Quick start with the OP-TEE Repo for 
QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8)
+- [TA Development Modes](#ta-development-modes)
+  - [Comparison](#comparison)
+  - [Supported Examples](#supported-examples)
+- [Quick Start with the OP-TEE Repo for 
QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8)
 - [Getting started](#getting-started)
   - [Environment](#environment)
     - [Develop with QEMUv8](#develop-with-qemuv8)
@@ -25,11 +33,48 @@ Teaclave (incubating)](https://teaclave.apache.org/).
   - [Run Rust Applications](#run-rust-applications)
     - [Run Rust Applications in QEMUv8](#run-rust-applications-in-qemuv8)
     - [Run Rust Applications on other 
platforms](#run-rust-applications-on-other-platforms)
+  - [Test](#test)
 - [Documentation](#documentation)
 - [Publication](#publication)
 - [Contributing](#contributing)
 - [Community](#community)
 
+
+## TA Development Modes
+
+### Comparison
+
+#### `no-std`
+
+- **Pros**:
+  - Reuses standard Rust tier-1 toolchain targets 
(`aarch64-unknown-linux-gnu`, 
+    `arm-unknown-linux-gnueabihf`).
+  - Significant performance improvements.
+  - Substantial reduction in binary size.
+  
+- **Cons**:
+  - Limited support for third-party crates. In the no-std mode, Trusted 
Applications
+   (TAs) are unable to utilize crates dependent on the standard library (std).
+
+#### `std`
+
+- **Pros**:
+  - Enables the utilization of more third-party crates, including those 
requiring
+    `std`, such as `serde_json` and `rustls`, which are essential for 
functionality.
+  
+- **Cons**:
+  - Manual porting of `std` with infrequent updates. Currently using `std` 
version
+   `1.56.1` and `Rust` version `nightly-2021-09-20`. (Planned to update)
+
+### Supported Examples
+
+- **Common**: See
+  [Overview of OP-TEE Rust 
Examples](https://teaclave.apache.org/trustzone-sdk-docs/overview-of-optee-rust-examples/).
+
+- **`no-std`**: Excludes `test_serde`, `test_tcp_client`, `test_udp_socket`,
+  `test_message_passing_interface`, `test_tls_client`, `test_tls_server`.
+
+
 ## Quick start with the OP-TEE Repo for QEMUv8
 
 Teaclave TrustZone SDK has been integrated into the OP-TEE Repo since OP-TEE
@@ -38,6 +83,9 @@ into OP-TEE's default filesystem for QEMUv8. Follow [this
 
documentation](https://optee.readthedocs.io/en/latest/building/optee_with_rust.html)
 to set up the OP-TEE repo and try the Rust examples!
 
+UPDATES: The `no-std` TA has replaced the original `std` TAs since OP-TEE 
+Release 4.1.0 (19/Jan/24).
+
 ## Getting started
 
 ### Environment
@@ -215,6 +263,12 @@ describes.
 
 Copy the applications to your platform and run.
 
+### Test
+
+In the `tests/` directory, we offer comprehensive tests for examples. The 
+applications can run on a pre-built QEMU image, independently of cloning the 
+OP-TEE repo. You can compose a simple test here to validate your application.
+
 ## Documentation
 
 - [Overview of OP-TEE Rust


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to