diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9689d19a8..21f8bacf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,11 @@ jobs: python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc", }, + { + os: "windows-latest", + python-architecture: "x86", + rust-target: "i686-pc-windows-msvc", + }, ] include: # ubuntu-24.04 does not support 3.7 @@ -141,6 +146,11 @@ jobs: python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc", }, + { + os: "windows-latest", + python-architecture: "x86", + rust-target: "i686-pc-windows-msvc", + }, ] include: # ubuntu-24.04 does not support 3.7 @@ -181,6 +191,7 @@ jobs: nox -f examples/simple/noxfile.py env: CARGO_TERM_VERBOSE: true + CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }} RUST_BACKTRACE: 1 cross-build: diff --git a/src/lib.rs b/src/lib.rs index 2b2d1f088..6b72c2151 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,9 +74,6 @@ as well as the [`PyReadonlyArray::try_as_matrix`] and [`PyReadwriteArray::try_as // and similar aren't constructible #![cfg_attr(feature = "gil-refs", deny(missing_debug_implementations))] -#[cfg(all(target_os = "windows", target_arch = "x86"))] -compile_error!("Compilation for 32-bit windows is not currently supported. See https://github.com/PyO3/rust-numpy/issues/448"); - pub mod array; mod array_like; pub mod borrow; diff --git a/src/npyffi/types.rs b/src/npyffi/types.rs index 68df9c52f..eb03b801b 100644 --- a/src/npyffi/types.rs +++ b/src/npyffi/types.rs @@ -19,15 +19,15 @@ pub type npy_long = c_long; pub type npy_float = f32; pub type npy_double = f64; pub type npy_hash_t = Py_hash_t; -pub type npy_int64 = c_long; -pub type npy_uint64 = c_ulong; -pub type npy_int32 = c_int; -pub type npy_uint32 = c_uint; +pub type npy_int64 = i64; +pub type npy_uint64 = u64; +pub type npy_int32 = i32; +pub type npy_uint32 = u32; pub type npy_ucs4 = c_uint; -pub type npy_int16 = c_short; -pub type npy_uint16 = c_ushort; -pub type npy_int8 = c_char; -pub type npy_uint8 = c_uchar; +pub type npy_int16 = i16; +pub type npy_uint16 = u16; +pub type npy_int8 = i8; +pub type npy_uint8 = u8; pub type npy_float64 = f64; pub type npy_complex128 = npy_cdouble; pub type npy_float32 = f32;