# Rust

# Flag

rustup default stable-x86_64-pc-windows-gnu 使gnu(依赖于GNU/MinGW-w64)成为默认工具链

不显示控制台窗口

  • https://rust-lang.github.io/rfcs/1665-windows-subsystem.html
  • https://learn.microsoft.com/zh-cn/cpp/build/reference/subsystem-specify-subsystem
  • https://stackoverflow.com/questions/74847732/can-you-make-a-windows-desktop-app-in-rust-and-winapi
  • https://stackoverflow.com/questions/29763647/how-to-make-a-program-that-does-not-display-the-console-window
# MSVC
cargo rustc --release -- -Clink-args="/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
# GCC 
cargo rustc --release -- -Clink-args="-Wl,--subsystem,windows"

# 第三方依赖

Cargo子命令