-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'specified instant was later than self' when installing rustlings on Windows Subsystem for Linux running Ubuntu 16.04 #60475
Comments
The issue seems to be due to how 'non-monitonic clocks' are handled (as introduced by #56988) Rust treats the Winodws system clock as potentially non-monotonic, in order to work around some weird system clock issues. However, since you're running Rust under WSL, you're running Rust built for Linux, which is treated as having a proper monotonic clock. My guess is that WSL simply forwards |
That makes sense. Is there any way around this? |
Since WSL runs unmodified Linux binaries, I think Rust will need to do runtime detection of WSL |
I decided to debug a Rust program which was not working correctly on Windows. Wanted to see the correct behavior on Linux first, so I tried to compile it with
I think I'll wait for a better day to do Rust development. |
It is now useful to specify WSL1 vs WSL2. WSL1 uses the Windows APIs to fulfill Linux API calls. WSL2, as I understand it, directs such syscalls through a Linux kernel atop the Virtual Machine Platform. If this is a defect in WSL1, it is a known defect, and it is recommended to use WSL2 instead. In the light of that, I believe we can close this issue for now. Of course, if I have missed something, then I would appreciate it if you reopened this with more information. |
After installing the latest rust via rustup (
--version
reports 1.34.1), I followed the instructions at https://github.com/rust-lang/rustlings/ to get the rustlings tutorial running. The cargo install fails with:It fails this way every time, although the "Downloaded" crate changes (it seems to manage to start the downloads, but fails quickly).
I'm not familiar with Rust's internals at all - let me know if I can generate more useful diags!
The text was updated successfully, but these errors were encountered: