Can anyone point me to how to build Rust programs on no-longer-supported Intel MacOS versions (edit: eg. v10.12, looks like that's the current cutoff for tier 2)?
I also wanted zig for ncdu2.
I admit I haven't looked too hard, macports has most of what I need still covered. It's always a sad day on my older hardware when I don't have brew auto-update disabled and a MacOS version goes out of support.
Rust still supports Intel Macs just fine. The x86_64-apple-darwin target was recently downgraded to tier 2, which just means that some automated tests will no longer run as part of the standard dev cycle.
With Windows 3.1, you're probably talking about having to compile to the Win16 interface, which would be a bit of a challenge.
LLVM's x86 backend doesn't really support 16-bit compilation (the best it gets to is supporting 32-bit in a 16-bit code segment). There's also no support for the Win16-based object file formats. So you'd probably be best off creating your own entirely new backend for a Win16 environment... which probably is easier than you'd think, given that you could ignore anything more complicated than the actual Intel 386 or 486 ISA. (I've actually started sketching out what the IR for such a backend would look like, mostly in terms of LLVM address space mappings).
Win16 is also kind of hard to target for Rust because it's a segmented memory model, and Rust's pointer model doesn't really cope with that well--it only supports one pointer type, and also requires that sizeof(ptr) == sizeof(usize) which is questionable for far pointers. If you're writing your own backend, you could just map everything to huge pointers at the programmer level and have optimization passes that convert them down to far or near pointers if sufficient.
Or you could stuff all of that, and just make a 32-bit app and wrap it in a shell loader that thunks all of the OS calls to 16-bit calls and vice-versa.
it would, just without standard library support, as the default stdlib imports system APIs that older versions don't provide. Other than those and a "supported OS version" filed in the PE header there isn't really much else in your way (hence my Rust9x project)
MSVC appears to have dropped support for Windows 3.1 in 2003 and Windows 9x in 2008. It might still be able to generate support for Windows XP and Vista if you scrounge up an appropriate SDK, but the default CRT it builds with sure doesn't support those platforms.
Nice, also check these projects that target earlier versions:
* Rust9x: Compile Rust code for Windows 95, NT and above: https://news.ycombinator.com/item?id=31112273
* Rust on MIPS64 Windows NT 4.0: https://news.ycombinator.com/item?id=29240174
Can anyone point me to how to build Rust programs on no-longer-supported Intel MacOS versions (edit: eg. v10.12, looks like that's the current cutoff for tier 2)?
I also wanted zig for ncdu2.
I admit I haven't looked too hard, macports has most of what I need still covered. It's always a sad day on my older hardware when I don't have brew auto-update disabled and a MacOS version goes out of support.
Rust still supports Intel Macs just fine. The x86_64-apple-darwin target was recently downgraded to tier 2, which just means that some automated tests will no longer run as part of the standard dev cycle.
I wonder what it would take to compile rust programs to run on Win 3.1. I don't know why you would, but, I wonder.
With Windows 3.1, you're probably talking about having to compile to the Win16 interface, which would be a bit of a challenge.
LLVM's x86 backend doesn't really support 16-bit compilation (the best it gets to is supporting 32-bit in a 16-bit code segment). There's also no support for the Win16-based object file formats. So you'd probably be best off creating your own entirely new backend for a Win16 environment... which probably is easier than you'd think, given that you could ignore anything more complicated than the actual Intel 386 or 486 ISA. (I've actually started sketching out what the IR for such a backend would look like, mostly in terms of LLVM address space mappings).
Win16 is also kind of hard to target for Rust because it's a segmented memory model, and Rust's pointer model doesn't really cope with that well--it only supports one pointer type, and also requires that sizeof(ptr) == sizeof(usize) which is questionable for far pointers. If you're writing your own backend, you could just map everything to huge pointers at the programmer level and have optimization passes that convert them down to far or near pointers if sufficient.
Or you could stuff all of that, and just make a 32-bit app and wrap it in a shell loader that thunks all of the OS calls to 16-bit calls and vice-versa.
Maybe it could be half way there with Win32s.
likely no_std, and running via Win32s. Rust doesn't have support for segmented memory, so native 16-bit would be much harder
I believe there is AVR support for Rust, which is 16-bit with separate code and data pointer types?
sorry, i was referring specifically to the x86 segmented memory model: https://en.wikipedia.org/wiki/X86_memory_segmentation (basically, near and far pointers)
And there's me stupdily thinking that as long as you have a compatible MSVC or LLVM backend that it would work.
Shows how little I know. :(
it would, just without standard library support, as the default stdlib imports system APIs that older versions don't provide. Other than those and a "supported OS version" filed in the PE header there isn't really much else in your way (hence my Rust9x project)
I thought win16 only supported NE and MZ, does it support PE?
this comment thread hasn't been talking about win16.
but you're right, win16 can only load some 32-bit PE files through something like Win32s
does it have anything to do with yet-to-be-evaluated functions?
Thanks, thunks. Thunks!
Blunks.
I guess, the reference was way too obscure. "Thanks, ants. Thants!" from Look Around You.
Bless you, Andrew. Blandrew.
Wait till you hear how to build c programs for windows vista,xp,98,3.1: just click “build” in Visual studio 6.
MSVC appears to have dropped support for Windows 3.1 in 2003 and Windows 9x in 2008. It might still be able to generate support for Windows XP and Vista if you scrounge up an appropriate SDK, but the default CRT it builds with sure doesn't support those platforms.
VS6 supports them all and results run on win11 as well. ISO is on archive.org, serial number is 111-1111111
enjoy
According to https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Histo..., the last version to support Win3.1 is VC++ 1.52 (which was shipped with VC++ up to version 4).
Unless you mean NT3.1 of course :^)
I sit corrected. use VS4, also from archive.org, same serial. produced binaries will also work on win11