Skip to content

Rust wrapper: update build.rs to support cross-compiling and bare-metal targets#10031

Open
holtrop-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-cross-compile-support
Open

Rust wrapper: update build.rs to support cross-compiling and bare-metal targets#10031
holtrop-wolfssl wants to merge 2 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-cross-compile-support

Conversation

@holtrop-wolfssl
Copy link
Contributor

Description

Rust wrapper: update build.rs to support cross-compiling and bare-metal targets

Testing

Built Rust crate for riscv32 and riscv64 targets.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@holtrop-wolfssl holtrop-wolfssl self-assigned this Mar 20, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 17:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-elf cross-compiles.
  • Update README with build notes for WOLFSSL_PREFIX and 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.

@holtrop-wolfssl
Copy link
Contributor Author

retest this please (wolfSSL error: tcp bind failed
Failure Reason Given is 1)

@holtrop-wolfssl holtrop-wolfssl marked this pull request as ready for review March 23, 2026 13:42
@holtrop-wolfssl
Copy link
Contributor Author

retest this please (hudson.AbortException: script returned exit code 2)

@holtrop-wolfssl
Copy link
Contributor Author

retest this please (Timeout waiting for agent to come back)

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.

4 participants