Skip to content

Commit de17e40

Browse files
authored
Set min support rust version to 1.82 and test 1.82-1.84 (#2)
* Run workflow on multiple versions of rustc. * It seems the unsafe extern issue was fixed in 1.82 so min version will be 1.82 and we will test 1.82 to 1.84. * Remove workaround instructions from README as no longer necessary.
1 parent d427ac7 commit de17e40

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

.github/workflows/rust.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,22 @@ env:
1111

1212
jobs:
1313
build:
14-
name: "Build and test ${{ matrix.os }}"
15-
runs-on: ${{ matrix.os }}
14+
name: "Build and test ${{ matrix.os }} with Rust ${{ matrix.rustc-version }}"
15+
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
1818
os: [windows-latest, ubuntu-latest, macOS-latest]
19+
rustc-version: [1.82.0, 1.83.0, 1.84.0]
1920
fail-fast: false
2021

2122
steps:
2223
- uses: actions/checkout@v4
2324
with:
2425
submodules: true
26+
- name: Install Rust ${{ matrix.rustc-version }}
27+
run: |
28+
rustup install ${{ matrix.rustc-version }}
29+
rustup default ${{ matrix.rustc-version }}
2530
- name: Build
2631
run: cargo build --verbose
2732
- name: Run tests

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "openvr_sys"
33
version = "2.1.0"
44
edition = "2021"
5+
rust-version = "1.82.0"
56
authors = [
67
"Colin Sherratt",
78
"Erick Tryzelaar",

README.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,4 @@ Contains function definitions for the [OpenVR](https://github.com/ValveSoftware/
66

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

12-
## Workaround for broken OpenVR ABIs (Linux/macOS only)
13-
14-
Search for packed structs in `headers/openvr.h`, i.e., `#pragma pack( push, 4 )`. Currently, that is:
15-
16-
```
17-
VRControllerState_t
18-
RenderModel_TextureMap_t
19-
RenderModel_t
20-
VREvent_t
21-
```
22-
23-
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:
24-
25-
```rust
26-
#[repr(C)]
27-
#[cfg_attr(unix, repr(packed(4)))]
28-
```

0 commit comments

Comments
 (0)