Skip to content

Commit

Permalink
feat: add windows-gnu to rust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Jan 22, 2025
1 parent d1168fc commit 98f9921
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
target: x86_64-unknown-linux-gnu
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: windows-latest
target: x86_64-pc-windows-gnu
- host: macos-14
target: aarch64-apple-darwin
- host: macos-latest
Expand Down
7 changes: 6 additions & 1 deletion bindings/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ fn main() {
// an int. There is a bug in bindgen associated with this. It assumes that a bool in C is
// the same size as a bool in Rust. This is the root cause of the issues on Windows. If/when
// this is fixed in bindgen, it should be safe to remove this compiler flag.
cc.flag("/std:c11");

// This flag is for MSVC
cc.flag_if_supported("/std:c11");

// This is for GCC
cc.flag_if_supported("-std=c11");
}

cc.include(c_src_dir.clone());
Expand Down

0 comments on commit 98f9921

Please sign in to comment.