-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New trampoline #609
New trampoline #609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works as expected then this looks good to me!
.join(".prefix") | ||
}); | ||
// First create the target prefix if it doesn't exist yet. | ||
fs::create_dir_all(&target_prefix).expect("could not create target prefix"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should result in a user error instead of an expect.
The canonicalize could be an expect because we already created the directory.
.parent() | ||
.expect("since we joined with target_dir there must be a parent"), | ||
)?; | ||
) -> Result<[PathsEntry; 1], std::io::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesnt have to be an array anymore.
launcher.extend_from_slice(&LAUNCHER_MAGIC_NUMBER); | ||
|
||
let target_location = target_dir.join(&relative_path_script_exe); | ||
fs::create_dir_all(target_location.parent().unwrap())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unwrap.
Did you build the binaries yourself? I am a little hesitant to include binaries without a proper reference to the source. I have no way to verify that this binary isnt mallicious. |
Nope, I copied them from UVs git repo :) but could be cool to build ourselves and make the magic number "pixi" instead of "uvuv", haha |
Shall we close this in favor of #639 ? |
yeah, let's close this one :) |
This fixes a bug I encountered with white spaces in the path to the prefix on Windows, and gives us win-arm64 support. I briefly tried to build the trampoline for win-32 as well, but didn't work out because I am missing
dlltool.exe
.This does not create 2 files anymore, but just a single .exe file. For some reason, the script is stored as a zip encoded file (not sure if I would have done it that way, but whatever). IMO it could be just the text file with offsets stored somewhere.
If we decide to use it we should add some more attribution :)