Milestone M4 — Rust Shim Integration¶
Issue: #7 (https://github.com/joelvaneenwyk/py-launch-lab/issues/7)
Description¶
Build and integrate the pyshim-win Rust crate as a GUI-subsystem executable that can launch Python processes without opening its own console window. The shim resolves interpreters on PATH, detects subsystem types at runtime, and emits structured JSON results.
How it Works¶
pyshim-winis compiled as a Windows GUI-subsystem executable (no console window)- It resolves
python,pythonw,uv,uvwon the system PATH - It spawns child processes using
CreateProcesswith appropriate flags - At runtime it detects whether the target is a console or GUI executable
- It emits a structured JSON result for each invocation
Tasks¶
- [ ] Implement
pyshim-winCLI with--hide-consoleflag - [ ] Implement
launch.rs: spawn child process usingCreateProcesswith appropriate flags - [ ] Implement
resolve.rs: locatepython,pythonw,uv,uvwon PATH - [ ] Implement
detect.rs: detect console vs GUI subsystem at runtime - [ ] Emit structured JSON result from shim
- [ ] Integration test:
test_shim.py
Related Issues¶
- Depends on m1-static-pe-inspection.md - shares PE subsystem classification concepts
Next Steps¶
- [ ] Cross-compile or build on a Windows runner
- [ ] Verify the shim does not flash a console window when launched
- [ ] Confirm JSON output matches the project schema