Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable symbol mangling on macOS and Windows (0.2.x branch) #35

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 23 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,30 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, [ubuntu-22.04, ARM64]]
runs-on: ${{ matrix.os }}
os-arch:
- { os: "ubuntu-latest", arch: "X64" }
- { os: "windows-11", arch: "X64" }
- { os: "macos-ventura", arch: "ARM64" }
- { os: "ubuntu-22.04", arch: "ARM64" }
runs-on: ["${{ matrix.os-arch.os }}", "${{ matrix.os-arch.arch }}"]

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install ACL
if: startsWith(matrix.os,'ubuntu')
if: startsWith(matrix.os-arch.os,'ubuntu')
run: sudo apt-get -y install acl-dev
- name: Install LLVM toolchain
if: startsWith(matrix.os-arch.os,'macos')
run: |
brew install llvm@19
ls /opt/homebrew/opt/llvm@19/bin
echo "/opt/homebrew/opt/llvm@19/bin" >> $GITHUB_PATH
- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Code format check
uses: actions-rs/cargo@v1
with:
Expand All @@ -34,11 +48,15 @@ jobs:
with:
command: clippy
args: -- -D warnings
- name: Build (without Iceoryx)
- name: Build (default features)
run: cargo build --verbose
- name: Build (with Iceoryx)
run: cargo build --features iceoryx --verbose
- name: Run tests (without Iceoryx)
- name: Build (with symbol prefixing)
run: cargo build --features prefix_symbols --verbose
- name: Run tests (default features)
run: cargo test --verbose
- name: Run tests (with Iceoryx)
run: cargo test --features iceoryx --verbose
- name: Run tests (with symbol prefixing)
run: cargo test --features prefix_symbols --verbose
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
name = "cyclors"
version = "0.2.3"
version = "0.2.4"
authors = ["kydos <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
keywords = ["DDS", "CycloneDDS"]
repository = "https://github.com/kydos/cyclors"
repository = "https://github.com/ZettaScaleLabs/cyclors"
documentation = "https://docs.rs/cyclors"
description = """
Low-level API for the native CycloneDDS bindings (libddsc-sys).
"""
categories = ["api-bindings"]
edition = "2018"
edition = "2021"

[lib]
name = "cyclors"
Expand All @@ -30,3 +30,4 @@ cmake = "0.1"

[features]
iceoryx = []
prefix_symbols = []
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# cyclors
Low level RUST APIs for cyclone

## Supported Features

* ```iceoryx```: Enable support for Iceoryx shared memory in Cyclone DDS.
* ```prefix_symbols```: Prefix the symbols in the Cyclone DDS and Cyclocut libraries with the version of the cyclors crate. This allows for different versions of the crate to be loaded together statically. On macOS and Windows platforms ```llvm-nm``` and ```llvm-objcopy``` are required.

**Note:** The ```iceoryx``` and ```prefix_symbols``` features are optional and cannot be enabled at the same time.
Loading
Loading