-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: codesign for deno compile binaries #24604
Conversation
@@ -129,66 +133,94 @@ pub fn load_npm_vfs(root_dir_path: PathBuf) -> Result<FileBackedVfs, AnyError> { | |||
root_path: root_dir_path, | |||
start_file_offset: trailer.npm_files_pos, | |||
}; | |||
Ok(FileBackedVfs::new(file, fs_root)) | |||
Ok(FileBackedVfs::new(data.to_vec(), fs_root)) |
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.
For future: FileBackedVfs can be made a zero-copy view on data
because sui returns a slice :)
Let's aim to land this one in v1.46. Is there anything blocking the Windows CI passing? |
Yup, v1.46 is reasonable. I rewrote sui and removed dependency on LIEF. Currently blocked on: denoland/sui#5 |
Moved Ready for review |
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.
seems legit. hope the double copy in FileBackedVfs can be fixed soon.
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.
LGTM!
The only real risk I see is staying up to date with apple's changes to mach-o (they've been known to add new load commands in updates). But since we're just patching offsets in LCs, it shouldn't be too hard to fix if that happens. I think it's probably not a big deal
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Hurray!!! |
Uses sui to inject metadata as a custom section in the denort binary.
Metadata is stored as a Mach-O segment on macOS and PE
RT_RCDATA
resource on Windows.Fixes #11154
Fixes #17753