mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
![]() ## Summary Partially closes #1917 This PR picks up on some of the great work from #1864 and opted to keep `panic_immediate_abort` (for size reasons). I split the PR in different isolated commits in case we want to separate/cherry-pick them out. 1. The first commit ports mostly all std changes from that PR into this PR. Binary sizes stayed the same ~16kb. 2. The second commit migrates our existing usage of windows-sys to windows for a safer ffi calls with Results!. It also changes all large unsafe blocks to be isolated to the actual unsafe calls, and switches some areas to use std such as getenv port ( which seemed buggy! ) from launcher.c. In addition, this also adds more error checking in order to match some missing assertions from distlib's launcher.c. Note, due to the additional .text data, the binary sizes increased to ~20.5kb, but we can cut back on some of the added error msgs as needed. 3. The third commit switches to using xwin for building on all 3 supported trampoline targets for sanity, and adds a CI bloat check for core::fmt and panic as a precaution. Sadly, this will invalidate the xwin cache on the first run. ## Test Plan Most changes were tested on a couple of local GUI apps and console apps, also tested some of the error states manually by using SetLastError at different points in the code and/or passing in invalid handles. I'm not sure how far we can get with migrating some of the other calls without increasing binary size substantially. An initial attempt at using std::path didn't seem so bad size wise when I tried it (~1k). On other cases, such as std::process::exit added ~10k to the total binary size. --------- Co-authored-by: konstin <konstin@mailbox.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
Readme.md |
Reimplementation of wheel installing in rust. Supports both classical venvs and monotrail.
There are simple python bindings:
from install_wheel_rs import LockedVenv
locked_venv = LockedVenv("path/to/.venv")
locked_venv.install_wheel("path/to/some_tagged_wheel.whl")
and there's only one function: install_wheels_venv(wheels: List[str], venv: str)
, where wheels
is a list of paths to wheel files and venv
is the location of the venv to install the packages in.
See monotrail for benchmarks.