forked from shumatech/BOSSA
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial bossa library and bossac utility
- CXX Rust wrapper around bossa so it can be statically linked library into rust utilities (this is useful for Windows applications rather than relying on external processes). * To get the rust wrapper to work some C++ changes were necessary to cleanup the api. This probably would have been easier if the wider C++ apis were const'd correctly but I err'd on the side of minimal changes. - bossac tries to be as close as possible to the C++ version of bossac (including cli args) - Does not expose the complete bossa library api (only those necessary for bossac) - An equivalent bossash should be possible, but I don't really use it so leaving it open to future contributions. - The bossa WxWidgets utility is more difficult, but might be possible with https://github.com/kenz-gelsoft/wxRust2. Personally, I would probably recommend https://github.com/KDAB/cxx-qt. But I don't really use either so I'll leave these as open to future contributions. - The existing C++ binaries should continue to function/build - Fix formbuilder warning (info) - Update wxWidgets mostly to 3.2 * Keep Linux at 3.0 for Ubuntu GitHub Action
- Loading branch information
Showing
37 changed files
with
1,704 additions
and
1,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: "Audit Dependencies" | ||
on: | ||
push: | ||
paths: | ||
# Run if workflow changes | ||
- '.github/workflows/audit.yml' | ||
# Run on changed dependencies | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
# Run if the configuration file changes | ||
- '**/audit.toml' | ||
# Rerun periodicly to pick up new advisories | ||
schedule: | ||
- cron: '0 0 * * *' | ||
# Run manually | ||
workflow_dispatch: | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- uses: actions-rust-lang/audit@v1 | ||
name: Audit Rust Dependencies | ||
with: | ||
ignore: RUSTSEC-2020-0071,RUSTSEC-2021-0139 | ||
|
||
deny: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: cargo-binstall | ||
run: | | ||
mkdir -p ~/.cargo/bin | ||
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
tar xf cargo-binstall*.tgz -C ~/.cargo/bin | ||
- run: cargo binstall --no-confirm cargo-deny | ||
- name: Cargo Deny | ||
run: cargo deny check licenses | ||
|
||
pants: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: cargo-binstall | ||
run: | | ||
mkdir -p ~/.cargo/bin | ||
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
tar xf cargo-binstall*.tgz -C ~/.cargo/bin | ||
- run: cargo binstall --no-confirm cargo-pants | ||
- name: Cargo Pants | ||
run: cargo pants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Rust Linux | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
deb_packages: >- | ||
libreadline-dev | ||
libwxgtk3.0-gtk3-dev | ||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ env.deb_packages }} | ||
- name: Cargo Check | ||
run: cargo check --all | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ env.deb_packages }} | ||
- name: ls | ||
run: | | ||
ls | ||
pwd | ||
- name: Cargo Build | ||
run: cargo build --all | ||
- name: Cargo Install | ||
run: cargo install --path bossac --bins --root dist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux_release_binaries | ||
path: dist/bin | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- name: Rustfmt Check | ||
uses: actions-rust-lang/rustfmt@v1 | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ env.deb_packages }} | ||
- name: Cargo Clippy | ||
run: cargo clippy --all-targets -- -D warnings | ||
|
||
udeps: | ||
name: cargo-udeps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ env.deb_packages }} | ||
- name: cargo-binstall | ||
run: | | ||
mkdir -p ~/.cargo/bin | ||
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
tar xf cargo-binstall*.tgz -C ~/.cargo/bin | ||
- run: cargo binstall --no-confirm cargo-udeps | ||
- name: Cargo Udeps | ||
run: cargo udeps --all-targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Rust macOS | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Cargo Install | ||
run: cargo install --path bossac --bins --root dist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: macos_release_binaries | ||
path: dist/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Rust Windows | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Cargo Install | ||
run: cargo install --path bossac --bins --root dist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: win_release_binaries | ||
path: dist/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "bossa" | ||
version = "2.0.0" | ||
authors = ["Jacob Alexander <[email protected]>, Scott Shumate <[email protected]>"] | ||
description = "Rust cxx wrapper around BOSSA SAM-BA library" | ||
edition = "2021" | ||
license = "BSD-3-Clause" | ||
repository = "https://github.com/kiibohd/BOSSA" | ||
|
||
[workspace] | ||
members = [ | ||
"bossac" | ||
] | ||
|
||
[dependencies] | ||
cxx = "1.0" | ||
|
||
[build-dependencies] | ||
cxx-build = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.