Skip to content

Conversation

@TheButlah
Copy link

@TheButlah TheButlah commented Dec 9, 2025

(continuation of #258 )

Attempting to build the SDK without stable compiler features is not possible right now due to the use of #![feature(error_in_core)]. However, this feature was stabilized in rust 1.81 in September 2024.

It would be good to remove the now-unneeded unstable flag.

@TheButlah TheButlah force-pushed the thebutlah/stable-nostd branch 2 times, most recently from 3931516 to 7139a0d Compare December 9, 2025 05:08
@TheButlah TheButlah force-pushed the thebutlah/stable-nostd branch from 7139a0d to ec74bef Compare December 9, 2025 05:10
@ivila
Copy link
Contributor

ivila commented Dec 9, 2025

pipeline fails with

error: an inner attribute is not permitted in this context
 --> /__w/teaclave-trustzone-sdk/teaclave-trustzone-sdk/optee-utee/target/debug/build/optee-utee-d980c343d6a5328f/out/error_in_core.rs:1:1
  |
1 | #![feature = "error_in_core"]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
  = note: outer attributes, like `#[test]`, annotate the item following them

And please add a valid license header to optee-utee/build.rs

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

let s = if version_check::is_min_version($version).unwrap_or(false) {
String::new()
} else {
format!("#![feature = \"{}\"]\n", $feat)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be: format!("#![feature({})]\n", $feat)

@@ -0,0 +1,27 @@
use std::fs;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a valid license header.

@TheButlah
Copy link
Author

Unfortunately it looks like the code doesn't work how I thought it would :(

@TheButlah
Copy link
Author

TheButlah commented Dec 9, 2025

Closing. I don't think there's a good solution here other than upgrading the stdlib fork and afterwards the rust-toolchain.toml.

@TheButlah TheButlah closed this Dec 9, 2025
@TheButlah TheButlah deleted the thebutlah/stable-nostd branch December 9, 2025 09:21
@ivila
Copy link
Contributor

ivila commented Dec 11, 2025

Fixed by #262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants