Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/rust-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Rust Wrapper

# START OF COMMON SECTION
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# END OF COMMON SECTION

jobs:
build_wolfssl:
name: Build wolfSSL Rust Wrapper
if: github.repository_owner == 'wolfssl'
runs-on: ubuntu-24.04
# This should be a safe limit for the tests to run.
timeout-minutes: 10
steps:
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
configure: --enable-all
- name: Build Rust Wrapper
working-directory: wolfssl
run: make -C wrapper/rust
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ aclocal.m4
aminclude.am
lt*.m4
Makefile.in
Makefile
/Makefile
depcomp
missing
libtool
Expand Down Expand Up @@ -457,6 +457,9 @@ wrapper/Ada/config/
wrapper/Ada/lib/
wrapper/Ada/obj/

# Rust wrapper files
/wrapper/rust/*/target/

# PlatformIO
/**/.pio
/**/.vscode/.browse.c_cpp.db*
Expand Down
9 changes: 9 additions & 0 deletions wrapper/rust/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.PHONY: all
all:
+$(MAKE) -C wolfssl-sys
+$(MAKE) -C wolfssl

.PHONY: clean
clean:
+$(MAKE) -C wolfssl-sys clean
+$(MAKE) -C wolfssl clean
17 changes: 17 additions & 0 deletions wrapper/rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# wolfSSL Rust Wrapper

## Building the wolfssl Rust Wrapper

First, configure and build wolfssl C library.

Then build the wolfssl Rust wrapper with:

make -C wrapper/rust

## Repository Directory Structure

| Repository Directory | Description |
| --- | --- |
| `/wrapper/rust` | Top level container for all Rust wrapper functionality. |
| `/wrapper/rust/wolfssl` | Top level for the `wolfssl` library crate. This crate contains high-level Rust sources that use the bindings from the `wolfssl-sys` crate. |
| `/wrapper/rust/wolfssl-sys` | Top level for the `wolfssl-sys` library crate. This crate contains only automatically generated bindings to the `wolfssl` C library. |
293 changes: 293 additions & 0 deletions wrapper/rust/wolfssl-sys/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions wrapper/rust/wolfssl-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "wolfssl-sys"
version = "0.1.0"
edition = "2024"

[features]
std = []

[build-dependencies]
bindgen = "0.72.1"

[profile.release]
strip = true
opt-level = "s"
lto = true
codegen-units = 1
panic = "abort"
7 changes: 7 additions & 0 deletions wrapper/rust/wolfssl-sys/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: all
all:
cargo build

.PHONY: clean
clean:
cargo clean
Loading
Loading