mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 18:36:44 +00:00
## Summary This is an experimental PR to replace more unsafe calls with more rust while still trying to keep the binary size small enough. These changes roughly increase the size of the trampolines to about 40kb~. This is a alternate PR to https://github.com/astral-sh/uv/pull/5751. The primary changes here include * Switch to use rust path components for ease of path management * Leverage `std::process::exit` for process exit and cleanup * Use `std::io::Error::last_os_error` for IO Errors to remove `FormatMessage` complexity * Use `std::env::current_exe` to get the current executable instead of `GetModuleFileNameA` ## Test Plan Added one more existing test case to trampoline tests. Still need to verify dunce::canonicalize is desired or not on find_python_exe. --------- 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.