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

feat/rescv64 #14

Merged
merged 6 commits into from
Dec 8, 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
13 changes: 13 additions & 0 deletions .github/workflows/publish-libaec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
archive: "tar"
target: "x86_64-unknown-linux-gnu"

- platform: "ubuntu-22.04" # riscv64
args: "--target riscv64gc-unknown-linux-gnu"
build-dir: "libaec-riscv64gc-unknown-linux-gnu"
archive: "tar"
target: "riscv64gc-unknown-linux-gnu"

- platform: "macos-latest" # Linux arm64
args: ""
build-dir: "libaec-android-aarch64"
Expand Down Expand Up @@ -81,6 +87,13 @@ jobs:
echo "CXX=aarch64-linux-gnu-g++" >> $GITHUB_ENV
if: matrix.target == 'aarch64-unknown-linux-gnu'

- name: Install riscv64 toolchain
run: |
sudo apt update
sudo apt install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libc6-dev-riscv64-cross
echo "RUSTFLAGS=-C linker=riscv64-linux-gnu-gcc" >> $GITHUB_ENV
if: matrix.target == 'riscv64gc-unknown-linux-gnu'

- name: Setup Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Acoustic echo cancellation in Rust based on [speexdsp](https://github.com/xiph/s
- 🦀 Rust and 🐍 Python support
- 🔗 Easy integration with C/C++ (or any other language) via C API
- 📦 Precompiled library and C header files available in the [releases](https://github.com/thewh1teagle/aec-rs/releases/latest)
- 🖥️ Support for Windows (x86/arm64), Linux (x86/arm64), macOS (x86/arm64), Android (arm64), IOS (arm64), and WASM!
- 🖥️ Support for Windows (x86/arm64), Linux (x86/arm64), macOS (x86/arm64), Android (arm64), IOS (arm64), WASM, and Riscv64!
- 🖥️ Run on Raspberry PI as well

# Install
Expand Down
4 changes: 4 additions & 0 deletions crates/aec-rs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ fn main() {
if target.contains("android") {
clang_target = "armv8-linux-androideabi".to_string();
}
if target.contains("riscv64gc-unknown-linux-gnu") {
// https://github.com/rust-lang/rust-bindgen/issues/2136
clang_target = "riscv64-unknown-linux-gnu".to_string();
}

let mut bindings = bindgen::Builder::default().header("wrapper.h");

Expand Down