forked from astral-sh/uv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more rust in trampoline (astral-sh#5750)
## 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 astral-sh#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 <[email protected]>
- Loading branch information
Showing
13 changed files
with
109 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.