apache / apache/teaclave-sgx-sdk
rustc_private error when compiling crates.io dependencies with Xargo configuration
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 268
- PR merge metrics
- No merged PRs in 30d
Description
When an enclave crate is configured to compile with Xargo, instead of manually importing the `sgx_tstd` standard library, you randomly get the following error from some dependencies:
```
error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
```
A lot of crates compile with no issue at all, correctly linking to the tstd, but random expressions used in some crates trigger this error.
This is probably due to some miss-configuration of the tstd.
Which version of rust's std is the tstd based on? Are updates from stable Rust pulled into the tstd?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the enclave crate build with the reported Xargo configuration and inspect how the tstd is configured and which Rust std version it uses. Done means crates.io dependencies compile consistently without the rustc_private error and the tstd version/update relationship is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100