Skip to content

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

Merged
douzzer merged 4 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-cross-compile-support
Mar 25, 2026
Merged

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

Conversation

@holtrop-wolfssl
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs Outdated
@holtrop-wolfssl
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

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

dgarske
dgarske previously approved these changes Mar 24, 2026
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (build results removed)

Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs Outdated
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs Outdated
Copilot AI review requested due to automatic review settings March 25, 2026 12:15
@holtrop-wolfssl holtrop-wolfssl removed their assignment Mar 25, 2026
Copy link
Copy Markdown
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs Outdated
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (FAIL: scripts/ocsp-stapling_tls13multi.test)

@douzzer douzzer merged commit 7efc962 into wolfSSL:master Mar 25, 2026
467 of 468 checks passed
@holtrop-wolfssl holtrop-wolfssl deleted the rust-cross-compile-support branch March 25, 2026 14:49
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.

6 participants