From 5bd76609f7f3116b2804f1be24320d11bc45e151 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 31 Jul 2024 21:15:13 -0700 Subject: feat: codesign for deno compile binaries (#24604) Uses [sui](https://github.com/littledivy/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 https://github.com/denoland/deno/issues/17753 ```cpp deno compile app.tsx # on macOS codesign --sign - ./app # on Windows signtool sign /fd SHA256 .\app.exe ``` --------- Signed-off-by: Divy Srivastava --- Cargo.lock | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index f33233ab7..5906abe3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1092,6 +1092,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +[[package]] +name = "debug-ignore" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe7ed1d93f4553003e20b629abe9085e1e81b1429520f897f8f8860bc6dfc21" + [[package]] name = "debugid" version = "0.8.0" @@ -1160,6 +1166,7 @@ dependencies = [ "junction", "lazy-regex", "libc", + "libsui", "libz-sys", "log", "lsp-types", @@ -2524,6 +2531,19 @@ dependencies = [ "spki", ] +[[package]] +name = "editpe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cede2bb1b07dd598d269f973792c43e0cd92686d3b452bd6e01d7a8eb01211" +dependencies = [ + "debug-ignore", + "indexmap", + "log", + "thiserror", + "zerocopy", +] + [[package]] name = "either" version = "1.10.0" @@ -4025,6 +4045,19 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "libsui" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2fedcf6cb4dd935f94a90e1c4300c727fe7112b8455615e902828c7401f84d" +dependencies = [ + "editpe", + "libc", + "sha2", + "windows-sys 0.48.0", + "zerocopy", +] + [[package]] name = "libz-sys" version = "1.1.16" @@ -8281,6 +8314,7 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ + "byteorder", "zerocopy-derive", ] -- cgit v1.2.3