This is an automated email from the ASF dual-hosted git repository. yuanz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
commit 487684210655ab227bd8a29b6f4be6b5892f07f5 Author: Yuan Zhuang <[email protected]> AuthorDate: Fri Aug 22 12:14:30 2025 +0000 lint: Add clippy enforcement to host and plugin Makefiles --- examples/acipher-rs/host/Makefile | 7 +++++-- examples/aes-rs/host/Makefile | 7 +++++-- examples/authentication-rs/host/Makefile | 7 +++++-- examples/big_int-rs/host/Makefile | 7 +++++-- examples/build_with_optee_utee_sys-rs/host/Makefile | 7 +++++-- examples/client_pool-rs/host/Makefile | 7 +++++-- examples/diffie_hellman-rs/host/Makefile | 7 +++++-- examples/digest-rs/host/Makefile | 7 +++++-- examples/error_handling-rs/host/Makefile | 7 +++++-- examples/hello_world-rs/host/Makefile | 9 ++++++--- examples/hotp-rs/host/Makefile | 7 +++++-- examples/inter_ta-rs/host/Makefile | 7 +++++-- examples/message_passing_interface-rs/host/Makefile | 8 ++++++-- examples/mnist-rs/host/Makefile | 7 +++++-- examples/property-rs/host/Makefile | 7 +++++-- examples/random-rs/host/Makefile | 7 +++++-- examples/secure_db_abstraction-rs/host/Makefile | 8 ++++++-- examples/secure_storage-rs/host/Makefile | 7 +++++-- examples/serde-rs/host/Makefile | 8 ++++++-- examples/signature_verification-rs/host/Makefile | 7 +++++-- examples/supp_plugin-rs/host/Makefile | 7 +++++-- examples/supp_plugin-rs/plugin/Makefile | 8 ++++++-- examples/tcp_client-rs/host/Makefile | 8 ++++++-- examples/time-rs/host/Makefile | 7 +++++-- examples/tls_client-rs/host/Makefile | 8 ++++++-- examples/tls_server-rs/host/Makefile | 8 ++++++-- examples/udp_socket-rs/host/Makefile | 8 ++++++-- 27 files changed, 144 insertions(+), 55 deletions(-) diff --git a/examples/acipher-rs/host/Makefile b/examples/acipher-rs/host/Makefile index 6216692..eaf9b5b 100644 --- a/examples/acipher-rs/host/Makefile +++ b/examples/acipher-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET) --release --config $(LINKER_CFG) strip: host diff --git a/examples/aes-rs/host/Makefile b/examples/aes-rs/host/Makefile index e1a29ce..f5e487d 100644 --- a/examples/aes-rs/host/Makefile +++ b/examples/aes-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/authentication-rs/host/Makefile b/examples/authentication-rs/host/Makefile index 635c835..2837dfe 100644 --- a/examples/authentication-rs/host/Makefile +++ b/examples/authentication-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/big_int-rs/host/Makefile b/examples/big_int-rs/host/Makefile index 0e19853..0244b2b 100644 --- a/examples/big_int-rs/host/Makefile +++ b/examples/big_int-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/build_with_optee_utee_sys-rs/host/Makefile b/examples/build_with_optee_utee_sys-rs/host/Makefile index 4c46f6e..6fa569d 100644 --- a/examples/build_with_optee_utee_sys-rs/host/Makefile +++ b/examples/build_with_optee_utee_sys-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) -vv strip: host diff --git a/examples/client_pool-rs/host/Makefile b/examples/client_pool-rs/host/Makefile index 9f5117f..3de4573 100644 --- a/examples/client_pool-rs/host/Makefile +++ b/examples/client_pool-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/diffie_hellman-rs/host/Makefile b/examples/diffie_hellman-rs/host/Makefile index 04cc3da..5c6286a 100644 --- a/examples/diffie_hellman-rs/host/Makefile +++ b/examples/diffie_hellman-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/digest-rs/host/Makefile b/examples/digest-rs/host/Makefile index 6a12c21..d88ac52 100644 --- a/examples/digest-rs/host/Makefile +++ b/examples/digest-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/error_handling-rs/host/Makefile b/examples/error_handling-rs/host/Makefile index 659d6fa..0e10df0 100644 --- a/examples/error_handling-rs/host/Makefile +++ b/examples/error_handling-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/hello_world-rs/host/Makefile b/examples/hello_world-rs/host/Makefile index da7c588..1ea1372 100644 --- a/examples/hello_world-rs/host/Makefile +++ b/examples/hello_world-rs/host/Makefile @@ -23,12 +23,15 @@ OBJCOPY := $(CROSS_COMPILE)objcopy LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release - .PHONY: all host strip clean emulate -all: host strip +all: clippy host strip + +clippy: + @cargo fmt + @cargo clippy --target $(TARGET) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET) --release --config $(LINKER_CFG) strip: host diff --git a/examples/hotp-rs/host/Makefile b/examples/hotp-rs/host/Makefile index 8d5a36f..aee8730 100644 --- a/examples/hotp-rs/host/Makefile +++ b/examples/hotp-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/inter_ta-rs/host/Makefile b/examples/inter_ta-rs/host/Makefile index 55a5c7e..08603ac 100644 --- a/examples/inter_ta-rs/host/Makefile +++ b/examples/inter_ta-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/message_passing_interface-rs/host/Makefile b/examples/message_passing_interface-rs/host/Makefile index 13cb4f4..6f52ade 100644 --- a/examples/message_passing_interface-rs/host/Makefile +++ b/examples/message_passing_interface-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/mnist-rs/host/Makefile b/examples/mnist-rs/host/Makefile index 1804544..6d5277c 100644 --- a/examples/mnist-rs/host/Makefile +++ b/examples/mnist-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/property-rs/host/Makefile b/examples/property-rs/host/Makefile index 0166655..6cde24d 100644 --- a/examples/property-rs/host/Makefile +++ b/examples/property-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/random-rs/host/Makefile b/examples/random-rs/host/Makefile index 5608917..2d82613 100644 --- a/examples/random-rs/host/Makefile +++ b/examples/random-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/secure_db_abstraction-rs/host/Makefile b/examples/secure_db_abstraction-rs/host/Makefile index 25f73cd..e6dd96b 100644 --- a/examples/secure_db_abstraction-rs/host/Makefile +++ b/examples/secure_db_abstraction-rs/host/Makefile @@ -26,9 +26,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/secure_storage-rs/host/Makefile b/examples/secure_storage-rs/host/Makefile index 4c28455..f027717 100644 --- a/examples/secure_storage-rs/host/Makefile +++ b/examples/secure_storage-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/serde-rs/host/Makefile b/examples/serde-rs/host/Makefile index c377862..c8b92e7 100644 --- a/examples/serde-rs/host/Makefile +++ b/examples/serde-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/signature_verification-rs/host/Makefile b/examples/signature_verification-rs/host/Makefile index 60bf00a..c7fa356 100644 --- a/examples/signature_verification-rs/host/Makefile +++ b/examples/signature_verification-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/supp_plugin-rs/host/Makefile b/examples/supp_plugin-rs/host/Makefile index 2cbf3b1..3992c7f 100644 --- a/examples/supp_plugin-rs/host/Makefile +++ b/examples/supp_plugin-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/supp_plugin-rs/plugin/Makefile b/examples/supp_plugin-rs/plugin/Makefile index c4d5b96..25ac10e 100644 --- a/examples/supp_plugin-rs/plugin/Makefile +++ b/examples/supp_plugin-rs/plugin/Makefile @@ -25,11 +25,15 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host -all: host +clippy: + @cargo fmt + @cargo clippy --target $(TARGET) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET) --release --config $(LINKER_CFG) cp $(CURDIR)/target/$(TARGET)/release/lib$(NAME).so $(CURDIR)/target/$(TARGET)/release/$(PLUGIN_UUID).plugin.so + clean: @cargo clean diff --git a/examples/tcp_client-rs/host/Makefile b/examples/tcp_client-rs/host/Makefile index 75a545f..a66e326 100644 --- a/examples/tcp_client-rs/host/Makefile +++ b/examples/tcp_client-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/time-rs/host/Makefile b/examples/time-rs/host/Makefile index d0ccff2..6ac7e81 100644 --- a/examples/time-rs/host/Makefile +++ b/examples/time-rs/host/Makefile @@ -24,10 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release +all: clippy host strip -all: host strip +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings -host: +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/tls_client-rs/host/Makefile b/examples/tls_client-rs/host/Makefile index d49f18f..f596402 100644 --- a/examples/tls_client-rs/host/Makefile +++ b/examples/tls_client-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/tls_server-rs/host/Makefile b/examples/tls_server-rs/host/Makefile index 946bde9..4ef568a 100644 --- a/examples/tls_server-rs/host/Makefile +++ b/examples/tls_server-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host diff --git a/examples/udp_socket-rs/host/Makefile b/examples/udp_socket-rs/host/Makefile index 734ed5c..c638432 100644 --- a/examples/udp_socket-rs/host/Makefile +++ b/examples/udp_socket-rs/host/Makefile @@ -24,9 +24,13 @@ LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)gcc\" OUT_DIR := $(CURDIR)/target/$(TARGET)/release -all: host strip +all: clippy host strip -host: +clippy: + @cargo fmt + @cargo clippy --target $(TARGET_HOST) -- -D warnings + +host: clippy @cargo build --target $(TARGET_HOST) --release --config $(LINKER_CFG) strip: host --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
