Skip to content

Conversation

briansmith
Copy link
Owner

Eliminate the windows-sys dependency on Aarch64. We believe there is no use for no_std support for this target.

Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.70%. Comparing base (03b223d) to head (237424b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2570      +/-   ##
==========================================
- Coverage   96.56%   95.70%   -0.86%     
==========================================
  Files         181      181              
  Lines       19799    19799              
  Branches      504      504              
==========================================
- Hits        19119    18949     -170     
- Misses        571      715     +144     
- Partials      109      135      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@briansmith briansmith force-pushed the b/std_detect branch 2 times, most recently from 8c6403b to 934b22e Compare June 11, 2025 22:19
Eliminate the windows-sys dependency on Aarch64. We believe there is no
use for `no_std` support for this target.
@complexspaces
Copy link
Contributor

Hey there, I wanted to follow up a point mentioned in the PR description:

We believe there is no use for no_std support for this target.

My current belief is that this isn't fully accurate. Microsoft is releasing VBS enclaves for Windows 11, which run .dll code inside a stripped down/restricted environment. As per MS's public dev guide, they use their own CRT as well:

Enclaves have their own versions of platform, startup, runtime and UCRT libs.

ring dropping support for no_std Windows would prohibit its use in these enclave builds. If you're just looking to remove the windows-sys dependency, I'd recommend switching to windows-bindgen and/or windows-link since ring only uses 2 symbols from the Win32 headers.

@briansmith
Copy link
Owner Author

Thanks. What is the target triple for VBS enclaves?

@complexspaces
Copy link
Contributor

complexspaces commented Jul 29, 2025

To my knowledge the target triples are identical, the only differences is the libs and flags passed to the linker. This blog mentions a Rust-based PoC someone at MS put together. I don't see any non-standard Rust targets in the repository. It only uses those flags and #![no_std] in lib.rs.

@briansmith
Copy link
Owner Author

Does IsProcessorFeaturePresent report AES features being available in an enclave?

I wonder if there is some way we could run the tests in an enclave in CI?

@complexspaces
Copy link
Contributor

I don't have an enclave dev environment set up at this moment, sorry, but I can get back to you later on checking if IsProcessorFeaturePresent functions correctly in the enclave.

I wonder if there is some way we could run the tests in an enclave in CI?

I don't believe it'd be possible today for several reasons, at least on GitHub-hosted CI. It requires VBS features to be enabled (which means the Windows host for the test code to run on needs to be able to do virtualization) and it needs a bleeding edge Windows 11 release. Everything else seems workable long-term but I think the nested virtualization would be an issue.

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