ivila commented on code in PR #285:
URL:
https://github.com/apache/teaclave-trustzone-sdk/pull/285#discussion_r2910516971
##########
setup_std_dependencies.sh:
##########
@@ -25,12 +25,19 @@ cd "$(dirname "$0")"
##########################################
# install Xargo if not exist
-which xargo || cargo install xargo
+if ! command -v xargo >/dev/null 2>&1; then
+ # xargo 0.3.26 does not compile on recent toolchains (TryLockError API
change).
+ # Build it with an older known-good nightly.
+ # Since we're working on migrating to cargo -Z build-std, we can remove
the xargo then.
+
XARGO_BOOTSTRAP_TOOLCHAIN=${XARGO_BOOTSTRAP_TOOLCHAIN:-nightly-2024-05-15}
+ rustup toolchain install "$XARGO_BOOTSTRAP_TOOLCHAIN" --profile minimal
+ cargo +"$XARGO_BOOTSTRAP_TOOLCHAIN" install xargo --locked
+fi
##########################################
-# initialize submodules: rust / libc
-RUST_BRANCH=optee-xargo
-LIBC_BRANCH=optee
+# initialize submodules: rust / libc / patches
+RUST_COMMIT=01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf # rust 1.93.1 stable
release
Review Comment:
I think using a more readable branch name would be better, such as
`rust_1.93.1_patch`
##########
examples/client_pool-rs/ta/Makefile:
##########
Review Comment:
We should check BUILDER after it's been declared.
Maybe move the changes after line 39.
##########
examples/serde-rs/ta/Cargo.toml:
##########
@@ -15,6 +15,8 @@
# specific language governing permissions and limitations
# under the License.
+cargo-features = ["panic-immediate-abort"]
+
Review Comment:
Perhaps we should wrap the hotfix functions (such as `rust_eh_personality`
and `_Unwind_Resume`) behind a `no_std_abort_fix` feature gate in `optee-utee`
crate. This avoids relying on unstable Cargo features and build-std, which
force us to use the nightly toolchain even at `no_std`.
##########
setup_std_dependencies.sh:
##########
@@ -39,11 +46,22 @@ fi
mkdir rust && cd rust
-git clone --depth=1 -b $RUST_BRANCH https://github.com/DemesneGH/rust.git && \
+# Clone official Rust source at specific commit
+git clone https://github.com/rust-lang/rust.git && \
Review Comment:
Omitting --depth=1 will waste a lot of bandwidth.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]