You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by iv...@apache.org on 2026/04/02 12:46:24 UTC

(teaclave-trustzone-sdk) 05/05: cargo-optee: move from crates to tools

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

ivila pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/teaclave-trustzone-sdk.git

commit 9f97ee0024877d016247721acbc3423a916a2fba
Author: ivila <39...@qq.com>
AuthorDate: Thu Apr 2 17:28:02 2026 +0800

    cargo-optee: move from crates to tools
---
 README.md                                          |  2 +-
 ci/build.sh                                        |  2 +-
 crates/Cargo.toml                                  |  1 -
 {crates/cargo-optee => tools}/Cargo.toml           | 38 +++++++++-------------
 {crates => tools}/cargo-optee/Cargo.toml           |  0
 {crates => tools}/cargo-optee/README.md            |  0
 .../cargo-optee/aarch64-unknown-optee.json         |  0
 .../cargo-optee/arm-unknown-optee.json             |  0
 {crates => tools}/cargo-optee/src/ca_builder.rs    |  0
 {crates => tools}/cargo-optee/src/cli.rs           |  0
 {crates => tools}/cargo-optee/src/common.rs        |  0
 {crates => tools}/cargo-optee/src/config.rs        |  0
 {crates => tools}/cargo-optee/src/main.rs          |  0
 {crates => tools}/cargo-optee/src/ta_builder.rs    |  0
 14 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index fe956a4..ead544a 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ The Docker image automates the entire setup process for TrustZone emulation
 in QEMU, enabling you to focus on writing and testing your applications 
 efficiently, without the hassle of manual configuration.
 
-**UPDATES:** We have introduced a more convenient build tool, [cargo-optee](./cargo-optee/README.md), 
+**UPDATES:** We have introduced a more convenient build tool, [cargo-optee](./tools/cargo-optee/README.md), 
 which provides better abstraction and a more ergonomic developer experience. In the long term, 
 we plan to gradually move away from the Makefile + Cargo workflow and adopt a more idiomatic Rust-based 
 development approach. To ensure a smooth transition, the existing Makefile-based build components are 
diff --git a/ci/build.sh b/ci/build.sh
index 6b2ded9..f5439bc 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -151,7 +151,7 @@ echo "==========================================="
 # Step 1: Build cargo-optee tool
 echo ""
 echo "Step 1: Building cargo-optee tool..."
-cd crates
+cd tools
 cargo build -p cargo-optee --release
 CARGO_OPTEE="$(pwd)/target/release/cargo-optee"
 cd ..
diff --git a/crates/Cargo.toml b/crates/Cargo.toml
index 7390a2b..c062cbd 100644
--- a/crates/Cargo.toml
+++ b/crates/Cargo.toml
@@ -18,7 +18,6 @@
 [workspace]
 resolver = "3"
 members = [
-    "cargo-optee",
     "optee-teec",
     "optee-teec-macros",
     "optee-teec-sys",
diff --git a/crates/cargo-optee/Cargo.toml b/tools/Cargo.toml
similarity index 59%
copy from crates/cargo-optee/Cargo.toml
copy to tools/Cargo.toml
index b821231..65ee986 100644
--- a/crates/cargo-optee/Cargo.toml
+++ b/tools/Cargo.toml
@@ -15,28 +15,20 @@
 # specific language governing permissions and limitations
 # under the License.
 
-[package]
-name = "cargo-optee"
-description = "A cargo subcommand for building OP-TEE Trusted Applications"
-version.workspace = true
-authors.workspace = true
-license.workspace = true
-repository.workspace = true
-edition.workspace = true
+[workspace]
+resolver = "3"
+members = [
+    "cargo-optee",
+]
 
-[[bin]]
-name = "cargo-optee"
-path = "src/main.rs"
+[workspace.package]
+version = "0.8.0"
+authors = ["Teaclave Contributors <de...@teaclave.apache.org>"]
+license = "Apache-2.0"
+repository = "https://github.com/apache/teaclave-trustzone-sdk.git"
+description = "TEE internal core API."
+edition = "2024"
 
-[dependencies]
-clap = { version = "4.5", features = ["derive"] }
-anyhow = "1.0"
-cargo_metadata = "0.18"
-serde.workspace = true
-serde_json.workspace = true
-toml = "0.8"
-indexmap = "=2.11.4"
-env_logger = "0.11"
-log = "0.4"
-tempfile = "3.8"
-dirs = "5.0"
+[workspace.dependencies]
+serde = { version = "1.0.228" }
+serde_json = { version = "1.0.149" }
diff --git a/crates/cargo-optee/Cargo.toml b/tools/cargo-optee/Cargo.toml
similarity index 100%
rename from crates/cargo-optee/Cargo.toml
rename to tools/cargo-optee/Cargo.toml
diff --git a/crates/cargo-optee/README.md b/tools/cargo-optee/README.md
similarity index 100%
rename from crates/cargo-optee/README.md
rename to tools/cargo-optee/README.md
diff --git a/crates/cargo-optee/aarch64-unknown-optee.json b/tools/cargo-optee/aarch64-unknown-optee.json
similarity index 100%
rename from crates/cargo-optee/aarch64-unknown-optee.json
rename to tools/cargo-optee/aarch64-unknown-optee.json
diff --git a/crates/cargo-optee/arm-unknown-optee.json b/tools/cargo-optee/arm-unknown-optee.json
similarity index 100%
rename from crates/cargo-optee/arm-unknown-optee.json
rename to tools/cargo-optee/arm-unknown-optee.json
diff --git a/crates/cargo-optee/src/ca_builder.rs b/tools/cargo-optee/src/ca_builder.rs
similarity index 100%
rename from crates/cargo-optee/src/ca_builder.rs
rename to tools/cargo-optee/src/ca_builder.rs
diff --git a/crates/cargo-optee/src/cli.rs b/tools/cargo-optee/src/cli.rs
similarity index 100%
rename from crates/cargo-optee/src/cli.rs
rename to tools/cargo-optee/src/cli.rs
diff --git a/crates/cargo-optee/src/common.rs b/tools/cargo-optee/src/common.rs
similarity index 100%
rename from crates/cargo-optee/src/common.rs
rename to tools/cargo-optee/src/common.rs
diff --git a/crates/cargo-optee/src/config.rs b/tools/cargo-optee/src/config.rs
similarity index 100%
rename from crates/cargo-optee/src/config.rs
rename to tools/cargo-optee/src/config.rs
diff --git a/crates/cargo-optee/src/main.rs b/tools/cargo-optee/src/main.rs
similarity index 100%
rename from crates/cargo-optee/src/main.rs
rename to tools/cargo-optee/src/main.rs
diff --git a/crates/cargo-optee/src/ta_builder.rs b/tools/cargo-optee/src/ta_builder.rs
similarity index 100%
rename from crates/cargo-optee/src/ta_builder.rs
rename to tools/cargo-optee/src/ta_builder.rs


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org