Skip to content

Add Rust dependency umbrella#8066

Merged
cjen1-msft merged 7 commits into
microsoft:mainfrom
cjen1-msft:tee-attestation-umbrella
Jul 20, 2026
Merged

Add Rust dependency umbrella#8066
cjen1-msft merged 7 commits into
microsoft:mainfrom
cjen1-msft:tee-attestation-umbrella

Conversation

@cjen1-msft

Copy link
Copy Markdown
Contributor

Summary

  • add a separate ccf-rs static-library umbrella around cose-rs
  • retain cose-rs as a standalone staticlib/rlib crate
  • build, link, and install libccf_rs.a through CMake

Testing

  • Rust 1.90 dev and release builds with --locked
  • cose_ffi_test
  • CMake, Rust, copyright, ASCII, include, and diff checks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
@cjen1-msft
cjen1-msft requested a review from a team as a code owner July 15, 2026 10:36
Copilot AI review requested due to automatic review settings July 15, 2026 10:36
@cjen1-msft
cjen1-msft marked this pull request as draft July 15, 2026 10:37
Comment thread src/cose/cose_rs/Cargo.toml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new Rust “umbrella” static library (ccf-rs) which depends on (and packages) cose-rs, and updates the CMake build so ccfcrypto links against the new libccf_rs.a instead of directly linking libcose_rs.a. This fits into the broader codebase by keeping the Rust COSE implementation buildable via Cargo while presenting a single static library artifact to the CMake/C++ build.

Changes:

  • Add new src/rust/ Cargo package (ccf-rs) that re-exports cose-rs and builds as a staticlib with a pinned toolchain.
  • Update cose-rs crate-types to also emit an rlib (while retaining staticlib support).
  • Replace the old CMake Rust build glue (cose_openssl.cmake) with ccf_rs.cmake, and relink ccfcrypto to the new Rust umbrella staticlib.

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/rust/src/lib.rs Defines the umbrella crate’s root and re-exports cose_rs.
src/rust/rust-toolchain.toml Pins the Rust toolchain for building ccf-rs.
src/rust/Cargo.toml New ccf-rs package definition producing libccf_rs.a and depending on cose-rs.
src/rust/Cargo.lock Locks dependency graph for reproducible ccf-rs builds.
src/rust/.gitignore Ignores Cargo target/ output for the new crate.
src/cose/cose_rs/Cargo.toml Extends cose-rs outputs to include rlib alongside staticlib.
CMakeLists.txt Switches CMake inclusion from removed Rust module to the new ccf_rs.cmake.
cmake/crypto.cmake Updates ccfcrypto to link against libccf_rs.a and depend on cargo-build_ccf_rs.
cmake/cose_openssl.cmake Removed legacy CMake logic that built/installed libcose_rs.a directly.
cmake/ccf_rs.cmake New CMake logic to build and install libccf_rs.a via Cargo.

@cjen1-msft cjen1-msft mentioned this pull request Jul 15, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
Comment thread .gitignore Outdated
Comment thread src/rust/Cargo.lock
cjen1-msft and others added 4 commits July 15, 2026 14:24
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
@cjen1-msft
cjen1-msft marked this pull request as ready for review July 15, 2026 15:12
@cjen1-msft
cjen1-msft merged commit ded6766 into microsoft:main Jul 20, 2026
19 checks passed
@cjen1-msft
cjen1-msft deleted the tee-attestation-umbrella branch July 20, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants