Skip to content

rust9x-1.98-beta-v1

Choose a tag to compare

@seritools seritools released this 25 Jul 21:31
  • Rebased onto Rust 1.98.0-beta
  • Initial windows-gnu target support, thanks @Jookia (#60, #65)!
    • Currently needs Windows 98/NT4 or higher. Documentation is still WIP, stay tuned!
  • Disabled native TLS entirely (alignment issues on pre-Vista), thanks @Jookia (#61)!
  • Bring back TLS-callback-based destructor impl. The new fiber-based one upstram is Vista+ only.
  • Remove accidental dbghelp.lib link dependency. dbghelp is loaded dynamically anyway.
  • Implement GetFileSizeExW fallback, thanks @Jookia!

NT 3.5 and 3.51

NT 3.51 has been broken (#46) since at least rust9x 1.84. I finally fixed the issues.
Additionally, NT 3.5 is now also functional!

  • Go back to pure-Rust UTF-8<->UTF-16 conversion: NT before 4 doesn't support the CP_UTF8 codepage in the conversion routines.
  • Reduced the initial stack size in rust9x-sample. NT 3.51 thinks a huge stack size of 1MiB must be an error, and promptly ignores it, giving you a tiny default stack size instead, almost immediately causing a stack overflow when trying to write to the console.
  • FILE_OPEN_REPARSE_POINT is not supported on NT before 4. Now falling back to not using it when needed.
  • NT 3.5 doesn't support FILE_APPEND_DATA/FILE_WRITE_DATA, just like 9x/Me. Now falling back to just seeking to the end of the file.

The final goal is NT 3.1 support, being the first 32-bit Windows version. Sadly, even runtimes as old as MSVC6 don't support it, and older ones seem to fail to link correctly. #67

Faster sync primitives

Major speed boost for 9x/Me, and unblocking NT < 4:

  • Remove CreateMutex-based fallback for Mutex: Instead, reimplement the missing TryEnterCriticalSection for 9x/Me and NT before 4.
  • Similarly, reimplement missing TryAcquireSRWLockExclusive for the SRWLock-based Mutex, bringing the fast implementation from 7+ down to Vista+.