astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.82k stars 467 forks source link

Discover cosmo-ified (`.com`) binaries on Windows #1091

Closed mataha closed 6 months ago

mataha commented 6 months ago

Executables compiled with Cosmopolitan libc runtime have a .com extension on Windows. This includes cosmo-ified Python binaries.

Example here.

zanieb commented 6 months ago

Hi! Did you confirm that these work once discovered?

zanieb commented 6 months ago

And is there a reason they can't use the system standard executable suffix?

mataha commented 6 months ago

Hi! Did you confirm that these work once discovered?

Python works, which is good enough for me. I was hoping that scripts would work as well, but these report "program not found" as std::process::Command is used under the hood with all of its shortcomings.

And is there a reason they can't use the system standard executable suffix?

It's to distinguish them from the standard PE executable format. That said, Windows itself bundles some .com binaries for compatibility purposes (more being the most egregious example) even though they're PE.

mataha commented 5 months ago

Thanks!