Add Rust dependency umbrella#8066
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
cjen1-msft
commented
Jul 15, 2026
Contributor
There was a problem hiding this comment.
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-exportscose-rsand builds as astaticlibwith a pinned toolchain. - Update
cose-rscrate-types to also emit anrlib(while retainingstaticlibsupport). - Replace the old CMake Rust build glue (
cose_openssl.cmake) withccf_rs.cmake, and relinkccfcryptoto 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. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
achamayou
reviewed
Jul 15, 2026
cjen1-msft
commented
Jul 15, 2026
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
marked this pull request as ready for review
July 15, 2026 15:12
achamayou
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ccf-rsstatic-library umbrella aroundcose-rscose-rsas a standalone staticlib/rlib cratelibccf_rs.athrough CMakeTesting
--lockedcose_ffi_test