Window에서 tauri 쓸때의 이슈
Windows Build Environment Setup for Tauri (MSVC vs. GNU)
When building a Tauri application on Windows, you may encounter a linker error stating that link.exe cannot be found. This document outlines the causes, licensing implications in large enterprises, and alternative solutions.
1. The Issue: link.exe Not Found
Cause
Rust, by default, uses the Microsoft Visual C++ (MSVC) toolchain on Windows. This requires the MSVC linker (link.exe) to assemble the final executable, which is not available by default unless Visual Studio or Build Tools are installed. Note that VS Code is just a text editor and does not include these compiler tools.
Standard Solution (For Individuals / Licensed Users)
1.
Download Visual Studio Build Tools (2017 or later).
2.
During installation, select the "Desktop development with C++" workload.
3.
Ensure MSVC v14x and Windows 10/11 SDK are checked in the installation details.
4.
Restart your system to apply environment variables.
2. Enterprise Licensing Constraints (Crucial for Large Corporations)
Options for Large Enterprises:
•
Option A: Verify if your company already provides paid Visual Studio Professional or Enterprise subscriptions. If licensed, you can legally use the standalone Build Tools.
•
Option B: Switch to a 100% free, open-source compiler toolchain (MinGW-w64 / GNU).
3. Alternative Solution: Switching to GNU Toolchain (MinGW-w64)
If purchasing a Microsoft license is not feasible, you can switch Rust's build target to the GNU environment, which is completely free for any corporate scale.
Setup Guide
1.
Add the GNU Target to Rust:
rustup target add x86_64-pc-windows-gnu
Bash
복사
1.
Set GNU as the Default Toolchain:
rustup default stable-x86_64-pc-windows-gnu
Bash
복사
1.
Install the MinGW Compiler Suite:
Install GCC/MinGW via a Windows package manager (Run in Terminal):
# Using Scoop
scoop install mingw
# Or using Chocolatey
choco install mingw
Bash
복사
4. Comparison: MSVC vs. MinGW-w64
A common concern is whether the GNU-based compiler suffers from poor performance. In short, runtime performance differences are negligible for standard desktop apps, but there are technical trade-offs:
Feature | MSVC (Visual Studio) | MinGW-w64 (GNU) |
Runtime Performance | Excellent (Native Windows optimization) | Excellent (Indistinguishable in real-world use) |
Build Stability | Extremely Stable (Tauri's default recommendation) | Potential dependency compatibility issues |
Binary File Size | Smaller (Dynamically links to Windows DLLs) | Larger (Statically embeds compatibility wrappers) |
Antivirus False Positives | Rare | More frequent (GNU binaries sometimes trigger V3/AlYac/Defender) |
Licensing Fee | Paid for large enterprises | 100% Free regardless of company size |
Recommendation
For a large enterprise environment, it is best to try the GNU (x86_64-pc-windows-gnu) setup first to avoid compliance risks. If you encounter persistent build errors due to Tauri's deep integration with Windows native APIs (WebView2), request a Visual Studio Professional license from your procurement department.
안녕하세요
•
관련 기술 문의와 R&D 공동 연구 사업 관련 문의는 “glory@keti.re.kr”로 연락 부탁드립니다.
Hello 
•
For technical and business inquiries, please contact me at “glory@keti.re.kr”
