Skip to content

Set min support rust version to 1.82 and test 1.82-1.84 #2

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

Merged
merged 3 commits into from
Jan 29, 2025
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
9 changes: 7 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ env:

jobs:
build:
name: "Build and test ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
name: "Build and test ${{ matrix.os }} with Rust ${{ matrix.rustc-version }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
rustc-version: [1.82.0, 1.83.0, 1.84.0]
fail-fast: false

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust ${{ matrix.rustc-version }}
run: |
rustup install ${{ matrix.rustc-version }}
rustup default ${{ matrix.rustc-version }}
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "openvr_sys"
version = "2.1.0"
edition = "2021"
rust-version = "1.82.0"
authors = [
"Colin Sherratt",
"Erick Tryzelaar",
Expand Down
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,4 @@ Contains function definitions for the [OpenVR](https://github.com/ValveSoftware/

1. `git submodule update --init --recursive` (initial checkout only)
1. `git submodule foreach git pull origin master` to update the submodule
1. `cargo build --features "buildtime_bindgen"` to update the bindings
1. Apply the workaround for broken OpenVR ABIs, if required

## Workaround for broken OpenVR ABIs (Linux/macOS only)

Search for packed structs in `headers/openvr.h`, i.e., `#pragma pack( push, 4 )`. Currently, that is:

```
VRControllerState_t
RenderModel_TextureMap_t
RenderModel_t
VREvent_t
```

Depending on what bindgen did parse, you have to replace a bunch of `#[repr(C)]` and `#[repr(C, packed(4))]` precending those structs in `bindings.rs` with:

```rust
#[repr(C)]
#[cfg_attr(unix, repr(packed(4)))]
```