Skip to content

Commit f4cf67e

Browse files
committed
feat: Windows support
1 parent 91bedce commit f4cf67e

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.rs text eol=lf
3+
build.rs text eol=lf

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: [ubuntu-24.04, macos-14]
29+
os: [ubuntu-24.04, macos-14, windows-2022]
3030
# Fail fast!
3131
fail-fast: true
3232
steps:

matrix.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
{ "os": "macos-14", "target": "x86_64-apple-darwin", "builder": "cargo" },
88
{ "os": "macos-14", "target": "aarch64-apple-darwin", "builder": "cargo" },
99
{ "os": "windows-2022", "target": "x86_64-pc-windows-msvc", "builder": "cargo" },
10-
{ "os": "windows-2022", "target": "aarch64-pc-windows-msvc", "builder": "cargo" }
10+
{ "os": "windows-2022", "target": "aarch64-pc-windows-msvc", "builder": "cargo" },
11+
{ "os": "windows-2022", "target": "x86_64-pc-windows-gnu", "builder": "cargo" }
1112
]
1213
}

src/constants.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
33
pub const COMMIT: &str = env!("GIT_COMMIT_HASH");
44
pub const BUILD_DATE: &str = env!("BUILD_DATE");
5+
6+
#[cfg(not(target_os = "windows"))]
57
pub const COMPILE_C_LIB: &str = env!("C_LIB");
8+
#[cfg(all(target_os = "windows", target_env = "msvc"))]
9+
pub const COMPILE_C_LIB: &str = "msvc";
10+
#[cfg(all(target_os = "windows", target_env = "gnu"))]
11+
pub const COMPILE_C_LIB: &str = "gnu";

0 commit comments

Comments
 (0)