rust-g icon indicating copy to clipboard operation
rust-g copied to clipboard

Compiling error reworks. allow 64 with feature, block newer rustc without a feature.

Open MrsTonedOne opened this issue 1 year ago • 4 comments

Adds features that to allow compiling under 64 bit or a rustc version that is too new for windows 7 and 8 (note, the game servers are still windows server 2012, so rustc dropping windows 8 support under 1.76 will also fuck prod.)

Compiling under 64bit is required for OD support and this has turned from an error that was suppose to prevent footguns into an error that is itself a footgun.

MrsTonedOne avatar Jul 15 '24 10:07 MrsTonedOne

While this is good/necessary, we should probably bold / emphasize the bit in the readme even more so less people fall for the issue. The real problem is that it's a silent fail until you use it with DM code.

I don't see an easy way to emit compiler info statements unfortunately. See, this issue which is maybe familiar: https://internals.rust-lang.org/t/pre-rfc-add-compile-warning-macro/9370/8 and https://github.com/rust-lang/rust/issues/54140

ZeWaka avatar Jul 15 '24 15:07 ZeWaka

Is it possible to feature flag gate the error?

Cyberboss avatar Jul 15 '24 23:07 Cyberboss

Is it possible to feature flag gate the error?

[features]
allow_non_32bit = []
#[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.");

ZeWaka avatar Jul 16 '24 05:07 ZeWaka

Added features that block compiling under 64 bit or a rustc version that is too new for windows 7 and 8 (note, the game servers are still windows server 2012, so rustc dropping windows 8 support under 1.76 will also fuck us.

MrsTonedOne avatar Jul 20 '24 20:07 MrsTonedOne

This will be easier to copy and paste the windows 7 bits into a new webedit then to deal with conflicts, half of which are for lines that will no longer be changed.

MrsTonedOne avatar Aug 09 '24 06:08 MrsTonedOne