修复 Windows 下 CARGO_BUILD_RUSTC_WRAPPER=rustc 导致 wasm32 编译失败

dev.mjs 在 Windows 上将 bypass wrapper 设为 'rustc',导致 Cargo 执行 rustc <真实路径> - ... 时 rustc 将真实路径和 stdin 识别为两个输入文件报错 multiple input filenames。改为空字符串彻底禁用 wrapper。
This commit is contained in:
2026-06-12 23:11:54 +08:00
parent c7ae351b90
commit 9c175b1865

View File

@@ -37,7 +37,7 @@ const manifestPath = resolve(serverRsDir, 'Cargo.toml');
const modulePath = resolve(serverRsDir, 'crates/spacetime-module'); const modulePath = resolve(serverRsDir, 'crates/spacetime-module');
const viteCliPath = resolve(repoRoot, 'scripts/vite-cli.mjs'); const viteCliPath = resolve(repoRoot, 'scripts/vite-cli.mjs');
const adminWebDir = resolve(repoRoot, 'apps/admin-web'); const adminWebDir = resolve(repoRoot, 'apps/admin-web');
const LOCAL_DEV_RUSTC_WRAPPER_BYPASS = process.platform === 'win32' ? 'rustc' : '/usr/bin/env'; const LOCAL_DEV_RUSTC_WRAPPER_BYPASS = process.platform === 'win32' ? '' : '/usr/bin/env';
const SERVICE_NAMES = ['spacetime', 'api-server', 'web', 'admin-web']; const SERVICE_NAMES = ['spacetime', 'api-server', 'web', 'admin-web'];
const SERVICE_ALIASES = new Map([ const SERVICE_ALIASES = new Map([