@@ -168,8 +168,10 @@ symbol, so neither the CRT startup nor `std` runtime init runs. The flow in
168168
1691691 . ` GetModuleFileNameW ` gives the shim path and tool name. Replacing the ` .exe `
170170 extension with ` .shim ` locates the per-tool sidecar.
171- 2 . ` CreateFileW ` and ` ReadFile ` load the UTF-8 sidecar. The parser requires the
172- versioned header and accepts the ` single-root ` and ` split ` layouts.
171+ 2 . ` CreateFileW ` and ` ReadFile ` load the UTF-8 sidecar. Long paths are made
172+ absolute with ` GetFullPathNameW ` , then use the ` \\?\ ` drive prefix or the
173+ ` \\?\UNC\ ` network prefix. The parser requires the versioned header and
174+ accepts the ` single-root ` and ` split ` layouts.
1731753 . ` SetEnvironmentVariableW ` pins the sidecar's layout. A single-root pointer
174176 sets ` VP_HOME ` . A split pointer removes ` VP_HOME ` and sets ` VP_DATA_DIR ` ,
175177 ` VP_BIN_DIR ` , and ` VP_CACHE_DIR ` . Tool shims also set ` VP_SHIM_TOOL ` and
@@ -181,6 +183,7 @@ symbol, so neither the CRT startup nor `std` runtime init runs. The flow in
1811835 . ` SetConsoleCtrlHandler ` installs a handler that ignores Ctrl+C and
182184 Ctrl+Break; the child decides how to react.
1831856 . ` CreateProcessW ` spawns the child with inherited handles and startup info.
186+ The payload path uses the same extended-length normalization as the sidecar.
184187 When the parent redirected stdio (` STARTF_USESTDHANDLES ` ), the standard
185188 handles are forced inheritable first, as in uv-trampoline and distlib.
1861897 . ` WaitForSingleObject ` , ` GetExitCodeProcess ` , and ` ExitProcess ` propagate the
@@ -207,7 +210,7 @@ infer the layout from directory paths.
207210| ` #![no_main] ` + ` mainCRTStartup ` (no CRT startup, no ` std ` runtime init) | Done |
208211| Raw ` CreateProcessW ` instead of ` std::process::Command ` | Done |
209212
210- ** Binary size** : 13,312 B on x86_64-pc-windows-msvc and 13,824 B on
213+ ** Binary size** : 14,336 B on both x86_64-pc-windows-msvc and
211214aarch64-pc-windows-msvc, including sidecar parsing and error diagnostics. The
212215sidecar-aware ` std::process::Command ` implementation was 221,696 B on x86_64.
213216See Future Optimizations for the measured size ladder. The executable imports
@@ -307,17 +310,17 @@ When installing a pre-trampoline version (no `vp-shim.exe` in the package):
307310| ** Data embedding** | PE resources (kind, path, script ZIP) | Adjacent directory-layout sidecar |
308311| ** Dependencies** | ` windows ` crate (unsafe, no CRT) | Zero (raw FFI declaration) |
309312| ** Toolchain** | Nightly Rust (` panic="immediate-abort" ` ) | Nightly Rust (same technique) |
310- | ** Binary size** | 39-47 KiB | 13- 14 KiB |
313+ | ** Binary size** | 39-47 KiB | 14 KiB |
311314| ** Entry point** | ` #![no_main] ` + ` mainCRTStartup ` | Same approach |
312315| ** Error output** | ` ufmt ` (no ` core::fmt ` ) | ` WriteFile ` + Win32 error codes |
313316| ** Ctrl+C handling** | ` SetConsoleCtrlHandler ` → ignore | Same approach |
314317| ** Exit code** | ` GetExitCodeProcess ` → ` exit() ` | Same approach |
315318
316- The Vite+ trampoline is smaller because it embeds no PE resources and needs no
317- path canonicalization, job objects, or GUI subsystem support . It reads a small
318- sidecar next to its own filename, resolves ` vp.exe ` under the recorded data
319- root, and starts it. Both projects share the same build recipe and entry-point
320- structure.
319+ The Vite+ trampoline is smaller because it embeds no PE resources and only
320+ normalizes long file and process paths . It needs no job objects or GUI
321+ subsystem support. It reads a small sidecar next to its own filename, resolves
322+ ` vp.exe ` under the recorded data root, and starts it. Both projects share the
323+ same build recipe and entry-point structure.
321324
322325## Alternatives Considered
323326
@@ -357,7 +360,7 @@ last row is the current sidecar-aware raw implementation.
357360| Raw Win32 rewrite, normal ` main ` + build-std | nightly | 13,824 B |
358361| Raw Win32 rewrite + ` #![no_main] ` , no diagnostics | nightly | 6,656 B |
359362| Fixed-layout raw Win32 + ` #![no_main] ` + full diagnostics | nightly | 8,192 B |
360- | Sidecar-aware raw Win32 + ` #![no_main] ` + full diagnostics (shipped) | nightly | 13,312 B |
363+ | Sidecar-aware raw Win32 + ` #![no_main] ` + full diagnostics (shipped) | nightly | 14,336 B |
361364
362365For comparison: uv-trampoline ships 45,056 B (x64 console), Scoop's default
363366kiennq shim is 136,192 B (statically linked MSVC C), and Scoop once vendored
0 commit comments