Rust wrapper: update build.rs to support cross-compiling and bare-metal targets#10031
Open
holtrop-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
Open
Rust wrapper: update build.rs to support cross-compiling and bare-metal targets#10031holtrop-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
holtrop-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the wolfssl-wolfcrypt Rust wrapper build script to better support cross-compiling—especially bare-metal RISC-V targets—by improving include/lib discovery and bindgen clang target configuration.
Changes:
- Add
WOLFSSL_PREFIX-based include/lib discovery with fallback to in-tree builds. - Configure bindgen with
--target(and optional sysroot include hints) for*-none-elfcross-compiles. - Update README with build notes for
WOLFSSL_PREFIXand cross-compiling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/build.rs | Adds prefix/in-tree path discovery, bare-metal target mapping + sysroot detection, and more conditional link behavior. |
| wrapper/rust/wolfssl-wolfcrypt/README.md | Documents WOLFSSL_PREFIX and basic RISC-V cross-compiling usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
retest this please (wolfSSL error: tcp bind failed |
dgarske
approved these changes
Mar 23, 2026
Contributor
Author
|
retest this please (hudson.AbortException: script returned exit code 2) |
Contributor
Author
|
retest this please (Timeout waiting for agent to come back) |
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.
Description
Rust wrapper: update build.rs to support cross-compiling and bare-metal targets
Testing
Built Rust crate for riscv32 and riscv64 targets.
Checklist