mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-20 08:25:13 +00:00
Page:
Using Rust on Windows
Pages
Anticipated breaking changes during 1.0 alpha
Community User Groups, Meetups, and Events
Community libraries
Doc continuous integration
Doc how to install an unofficial nightly for Windows
Doc Emacs Support
Doc FAQ Cheatsheet
Doc building for android
Doc building for ios
Doc detailed release notes
Doc examples
Doc friends of the tree
Doc language faq
Doc lowlevel details
Doc packages, editors, and other tools
Doc releases
Doc under construction FAQ
Doc vim support
Docs project structure
Docs
Games written in Rust
Home
Howto submit a rust bug report
IRC notifications channel
Lib datetime
Lib fmt
Lib html
Lib io
Lib rand
Lib re
Library editing
Libs
Meeting API review 2014 06 23
Meeting RFC triage 2014 06 19
Mixed language link time optimization
Note Building Rust Before 0.8 on Windows Systems
Note 0.5 priorities
Note Intrinsics
Note Rust performance fixes
Note bors usage
Note buildbots
Note code review
Note compiler snapshots
Note core team
Note development policy
Note getting started developing Rust
Note git workflow
Note guide for new contributors
Note operator overloading
Note priority issue criteria
Note research
Note rustc hacking guide back end
Note rustc hacking guide front end
Note rustc hacking guide middle end
Note rustc hacking guide
Note seeing LLVM output from rust
Note style guide
Note tag label names and definitions
Note testsuite
Note wiki conventions
Notes
OS Bridge 2013 tutorial
Operating system development
Projects using Rust
Rustpkg schedule
Sigil reference
Teaching Rust
The Rusticon
Using Rust on Windows
lib template
No results
23
Using Rust on Windows
Peter Atashian edited this page 2015-01-15 08:52:01 -05:00
Table of Contents
As of release 0.12, Rust distribution for Windows is completely self-contained and includes all dependencies from MinGW toolchain required for building Windows binaries.
Notes:
- Rust compiler uses
gccas a linker driver, and will search for it in the systemPATHbefore searching in the private directory. This means that any other versions found onPATHwill override the one bundled with Rust, and may cause linking errors if they aren't compatible. The solution is to strip down thePATHin the console session used to launchrustc. - The 32-bit binaries produced by
rustcwill depend on the shared GCC runtime library,libgcc_s_dw2-1.dll, which you will need to distribute along with your program. You'll find it in the/bindirectory.
The 64-bit binaries are dependency-free.
Using Rust with MSYS2
If you want to use any dependencies that depend on C/C++ bits you will likely need a separately installed mingw as the mingw bundled with Rust is not capable of compiling C/C++ code, and only includes a minimal set of libs for system libraries. The recommended way to do this is using MSYS2.
- Download and install MSYS2 from http://msys2.github.io/.
- Download and install Rust+Cargo using the installer but be sure to disable the
Linker and platform librariesoption. - Ensure that Rust is in your
PATHand that there are no mingw installations in yourPATH. - Launch your MSYS2 environment using either
mingw32_shell.batormingw64_shell.batdepending upon which version of Rust you installed. - Install the mingw toolchain using
pacman -S mingw-w64-x86_64-toolchainorpacman -S mingw-w64-i686-toolchaindepending upon which version of Rust you installed. - Install the base set of developer tools using
pacman -S base-devel.
These instructions cover running Rust from a binary installation. To build Rust see further instructions.
All Categories:
- Docs -- For users
- Notes -- For developers
- Libs -- For library authors
- Meeting minutes