mirror of
				https://github.com/BurntSushi/ripgrep.git
				synced 2025-10-30 23:17:47 +02:00 
			
		
		
		
	cargo: statically link binary on Windows/MSVC
Before this change, rg.exe depended on vcruntime140.dll, which does not exist on a fresh install of Windows. Closes #1613
This commit is contained in:
		
				
					committed by
					
						 Andrew Gallant
						Andrew Gallant
					
				
			
			
				
	
			
			
			
						parent
						
							7534d5144f
						
					
				
				
					commit
					46d0130597
				
			
							
								
								
									
										8
									
								
								.cargo/config.toml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.cargo/config.toml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| # On Windows MSVC, statically link the C runtime so that the resulting EXE does | ||||
| # not depend on the vcruntime DLL. | ||||
| # | ||||
| # See: https://github.com/BurntSushi/ripgrep/pull/1613 | ||||
| [target.x86_64-pc-windows-msvc] | ||||
| rustflags = ["-C", "target-feature=+crt-static"] | ||||
| [target.i686-pc-windows-msvc] | ||||
| rustflags = ["-C", "target-feature=+crt-static"] | ||||
| @@ -39,6 +39,8 @@ Feature enhancements: | ||||
|   Yang. | ||||
| * [FEATURE #1404](https://github.com/BurntSushi/ripgrep/pull/1404): | ||||
|   ripgrep now prints a warning if nothing is searched. | ||||
| * [FEATURE #1613](https://github.com/BurntSushi/ripgrep/pull/1613): | ||||
|   Cargo will now produce static executables on Windows when using MSVC. | ||||
| * [FEATURE #1680](https://github.com/BurntSushi/ripgrep/pull/1680): | ||||
|   Add `-.` as a short flag alias for `--hidden`. | ||||
| * [FEATURE #1856](https://github.com/BurntSushi/ripgrep/pull/1856): | ||||
|   | ||||
							
								
								
									
										12
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								README.md
									
									
									
									
									
								
							| @@ -192,15 +192,9 @@ multiline search and opt-in fancy regex support via PCRE2. | ||||
| The binary name for ripgrep is `rg`. | ||||
|  | ||||
| **[Archives of precompiled binaries for ripgrep are available for Windows, | ||||
| macOS and Linux.](https://github.com/BurntSushi/ripgrep/releases)** Users of | ||||
| platforms not explicitly mentioned below are advised to download one of these | ||||
| archives. | ||||
|  | ||||
| Linux binaries are static executables. Windows binaries are available either as | ||||
| built with MinGW (GNU) or with Microsoft Visual C++ (MSVC). When possible, | ||||
| prefer MSVC over GNU, but you'll need to have the [Microsoft VC++ 2015 | ||||
| redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145) | ||||
| installed. | ||||
| macOS and Linux.](https://github.com/BurntSushi/ripgrep/releases)** Linux and | ||||
| Windows binaries are static executables. Users of platforms not explicitly | ||||
| mentioned below are advised to download one of these archives. | ||||
|  | ||||
| If you're a **macOS Homebrew** or a **Linuxbrew** user, then you can install | ||||
| ripgrep from homebrew-core: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user