<p dir="auto">A binary compiled with the recent master (or possibly much older master) and <code class="notranslate">extern mod native;</code> fails to run in Windows XP due to the missing symbols including <code class="notranslate">CreateSymbolicLinkW</code>, which are supported since <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363866%28v=vs.85%29.aspx" rel="nofollow">Windows Vista</a>. I don't have a working Windows XP environment at the moment so there might be more missing symbols. (I've received the report via some user with Windows XP.)</p>
<p dir="auto">I'm not sure if it is intentional or not, but given that libuv has a <a href="https://github.com/joyent/libuv/blob/c0716b3d9f89e3557a482ce499e7abc8db686418/src/win/fs.c#L1436">check</a> for the support, we at least need to determine whether to fix or not.</p>
<p dir="auto">I've made some investigation recently, and found that, there are only two APIs which are not supported by Windows XP, throughout the repo tree. There are:</p>
<ul dir="auto">
<li>CreateSymbolicLinkW, only used by native::io::file::symlink()</li>
<li>GetFinalPathNameByHandleW, only used by native::io::file::readlink()</li>
</ul>
<p dir="auto">And native::io::file::{symlink,readlink} are never used throughout the repo tree, except std::io::fs::{symlink,readlink} (which are really never used).</p>
<p dir="auto">Do we really need including symlink/readlink functionality inside std? How other languages do?</p>
<p dir="auto">Currently Windows XP is still wildly used in the world, especially in Asia. Its installed volume is much more than Mac OS + Linux + Unix. We give up supporting XP just because of two api absent? Maybe it's wrong.</p>
<p dir="auto">cc <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26678179" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/11950" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/11950/hovercard" href="https://github.com/rust-lang/rust/issues/11950">#11950</a></p>
<p dir="auto"><strong>update:</strong> readlink is used by rustc::metadata::filesearch.</p>
<p dir="auto"><strong>update:</strong> This is my branch: <a href="https://github.com/liigo/rust/tree/xp">https://github.com/liigo/rust/tree/xp</a><br>
I just commented out the usage of CreateSymbolicLinkW and GetFinalPathNameByHandleW. This make the new rustc.exe run successfully in Windows XP, ant it works mostly OK (see my latest comment below).</p>