from pathlib import Path import subprocess r=Path('');b=r/'master-rounding-grid';flags=['--edition=2024','-C','opt-level=3','-C','panic=abort'];subprocess.run(['rustc',*flags,str(b.with_suffix('.rs')),'-o',str(b)],check=True) flags += ['--target=x86_64-pc-windows-msvc','-C','target-feature=+crt-static','-C','linker=/usr/lib/llvm-19/bin/lld-link','-C','linker-flavor=lld-link','-C','link-arg=-nodefaultlib:ucrt','-C','link-arg=-defaultlib:libucrt'] for suffix in ['crt/lib/x86_64','sdk/lib/um/x86_64','sdk/lib/ucrt/x86_64']:flags+=['-Lnative=/'+suffix] subprocess.run(['rustc',*flags,str(b.with_suffix('.rs')),'-o',str(b.with_suffix('.exe'))],check=True)