-
Notifications
You must be signed in to change notification settings - Fork 379
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
Write Windows batch script version of 'miri' script? #1229
Comments
I should preface that I have not done any development on Windows for at least 15 years, so I have no idea at all what is considered a normal development environment on that platform.^^ That said, if there is a way to use the shell script we have, that seems like the best option to me. That shell script is maintained as Miri changes, and it is used by our CI, so it should just always work. Sharing code across platforms is better than re-writing things for each platform. Currently, Windows CI (via AppVeyor) does not use it; if you could help use it there that would be great. :D I suspect most devs will have git installed on their Windows box so your method will work for them? However, if you want to submit and maintain a Windows variant of that script, I'll happily review those patches. I just want to avoid having an outdated Windows-only script in the repository that nobody in the Miri team can fix or test. |
Why is there a script? Rust executables are far more portable. |
@eddyb well go read it yourself if you want to know what it does. ;) Note that the rustup distribution contains no script. The script is just for development. It handles building the Miri sysroot (usually done by cargo-miri, but during development you often want to work directly with the miri driver), working around rust-lang/rust#58343, things like that. |
I have, it looks like the kind of thing a Rust project would write in Rust :P.
Okay so this isn't as bad as it could be. |
Fair. ;) I'm somehow still reaching for shell/Python first for such things... It's not entirely trivial though, since this sets flags for the build it would have to at least be an entirely separate crate from the main thing. And workspaces always seemed too complicated for me...^^ |
Every cargo package is at most one lib crate and any number of bin crates, so you wouldn't need a workspace probably - or wait, whoops, do you mean it'd need to be a separate package? |
Yes. In particular it should have an independent set of dependencies. After all this sets RUSTFLAGS for the main compilation. Now, moving to a workspace would also help with #418, but still... so far I couldn't be bothered.^^ |
I agree with your point 😺 I've just learned that the Windows Build environment of Travis CI also uses Git Bash to run builds. Adding a single line Lines 10 to 12 in acdddc7
Thank you for your feedback! I'm closing the issue now 😅 |
We've experimented with using Travis for Windows CI in the past and it didn't really work. Maybe it got better since then. |
With #1407, we are now using |
With my Windows PC, I've been running the
miri
bash script by runningex.
sh miri run tests/run-pass/env.rs
.It's been working because I had
Git for Windows
installed (which comes withbash.exe
&sh.exe
)and I had the
sh.exe
added in my Path.Running
cargo miri
works in Windows, but themiri
bash script itself does not work out-of-the-box in Windows. The current method I'm using is more of a workaround, rather than proper support for Windows developers.I think it'd be nice to have a batch script version of
miri
script that Windows users can use out-of-the-box, without workarounds.p.s. if there is already proper support for Windows users to run the
miri
script, please let me know 😉The text was updated successfully, but these errors were encountered: