Skip to content
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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Jul 16, 2024

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

deno compile app.tsx

# on macOS
codesign --sign - ./app

# on Windows
signtool sign /fd SHA256 .\app.exe

@littledivy littledivy changed the title codesign for deno compile binaries feat: codesign for deno compile binaries Jul 16, 2024
@@ -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))
Copy link
Member Author

@littledivy littledivy Jul 17, 2024

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 :)

@bartlomieju bartlomieju added this to the 1.46 milestone Jul 22, 2024
@bartlomieju
Copy link
Member

Let's aim to land this one in v1.46. Is there anything blocking the Windows CI passing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants