diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 83b9a4e3..453e1c95 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,13 +14,13 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: - targets: i686-pc-windows-msvc # Used for clippy, since it doesn't need to build the entire std - components: rustfmt, clippy, rust-src + targets: x86_64-pc-windows-msvc + components: clippy, rustfmt, rust-src - uses: Swatinem/rust-cache@v2 - name: Clippy (all features) - run: cargo clippy --target i686-pc-windows-msvc --features all --locked -- -D warnings + run: cargo clippy -Z build-std --target i686-win7-windows-msvc --features all --locked -- -D warnings - name: Rustfmt run: cargo fmt -- --check @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest env: BYOND_MAJOR: 515 - BYOND_MINOR: 1636 + BYOND_MINOR: 1642 PKG_CONFIG_ALLOW_CROSS: 1 steps: @@ -52,7 +52,7 @@ jobs: sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386 ./scripts/install_byond.sh - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@nightly with: targets: i686-unknown-linux-gnu diff --git a/Cargo.toml b/Cargo.toml index 3ecb407f..1a5d85e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -168,6 +168,7 @@ rustls_tls = ["mysql/default-rustls"] # internal feature-like things jobs = ["flume"] +allow_non_32bit = [] [dev-dependencies] regex = "1" diff --git a/src/lib.rs b/src/lib.rs index 9cc7f274..6a3f7c31 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,5 +55,7 @@ pub mod url; #[cfg(feature = "worleynoise")] pub mod worleynoise; -#[cfg(not(target_pointer_width = "32"))] -compile_error!("rust-g must be compiled for a 32-bit target"); +#[cfg(all(not(target_pointer_width = "32"), not(feature = "allow_non_32bit")))] +compile_error!( + "Compiling for non-32bit is not allowed without enabling the `allow_non_32bit` feature." +);