From 69a40b79460bff9df240d369b46094c08b46283b Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 11 Jun 2023 20:24:40 -0700 Subject: [PATCH 1/9] build: bump metagoblin to 0.9; update lockfile --- Cargo.lock | 347 +++++++++++++++++++++++++++-------------------------- Cargo.toml | 2 +- 2 files changed, 177 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bfaba02..e844313 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,67 @@ version = 3 [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys", +] + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "atty" @@ -52,18 +101,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", -] - [[package]] name = "cc" version = "1.0.79" @@ -78,58 +115,68 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.1.4" +version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +checksum = "ca8f255e4b8027970e78db75e78831229c9815fdbfa67eb1a1b777a62e24b4a0" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acd4f3c17c83b0ba34ffbc4f8bbd74f079413f747f84a6f89292f138057e36ab" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex", "strsim", - "termcolor 1.2.0", "terminal_size", ] [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] name = "clap_lex" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" -dependencies = [ - "os_str_bytes", -] +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "cpp_demangle" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b446fd40bcc17eddd6a4a78f24315eb90afdb3334999ddfd4909985c47722442" +checksum = "2c76f98bdfc7f66172e6c7065f981ebb576ffc903fe4c0561d9f0c2509226dc6" dependencies = [ "cfg-if", ] [[package]] name = "csv" -version = "1.1.6" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" dependencies = [ - "bstr", "csv-core", "itoa", "ryu", @@ -187,13 +234,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys", ] [[package]] @@ -208,9 +255,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -219,9 +266,9 @@ dependencies = [ [[package]] name = "goblin" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572564d6cba7d09775202c8e7eebc4d534d5ae36578ab402fb21e182a0ac9505" +checksum = "ba24f3858a108b3fd5d6c3d790884f0c4e0a83e092be1d67ef41dd8cbfdbe969" dependencies = [ "log", "plain", @@ -245,9 +292,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b5cb0902c2b6d65d5fd97dfa30f9b70c7538e770b98eab5ed52d8db923e01" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "hexplay" @@ -267,31 +314,32 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi 0.3.0", + "hermit-abi 0.3.1", "io-lifetimes", "rustix", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "lazy_static" @@ -301,24 +349,21 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "memchr" @@ -328,9 +373,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "metagoblin" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099c12977e886fecf035e8bda1689ebaa3fce5300fc7811a1e7d6c031ca24c7d" +checksum = "e0cd13fbcddd1841f532824b4fcf7143c2e0bbeaf443041935e928b3e679d0a1" dependencies = [ "goblin", "log", @@ -338,15 +383,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" - -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "plain" @@ -368,44 +407,20 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -432,58 +447,52 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.36.8" +version = "0.37.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "scroll" @@ -502,14 +511,14 @@ checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "serde" -version = "1.0.152" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" [[package]] name = "strsim" @@ -519,9 +528,20 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -559,39 +579,39 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ "rustix", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-width" @@ -600,10 +620,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] -name = "version_check" -version = "0.9.4" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "wasi" @@ -653,33 +673,18 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -692,42 +697,42 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/Cargo.toml b/Cargo.toml index d538962..d14d042 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ clap = { version = "4", features = ["derive", "wrap_help"] } term = "0.7" [dependencies.metagoblin] -version = "0.8" +version = "0.9" [[bin]] name = "bingrep" From 0f2e95b9fc68ce0971c7e992287c6b656c60b56e Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 13:20:28 -0800 Subject: [PATCH 2/9] build: update to metagoblin 0.10; update various deps --- Cargo.lock | 475 ++++++++++++++++++++++++++--------------------- Cargo.toml | 10 +- src/format.rs | 19 +- src/format_pe.rs | 20 +- src/main.rs | 6 + 5 files changed, 295 insertions(+), 235 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e844313..1bfc6d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,67 +4,68 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "atty" @@ -90,49 +91,41 @@ dependencies = [ "metagoblin", "prettytable-rs", "rustc-demangle", - "scroll", + "scroll 0.13.0", "term", - "termcolor 1.2.0", + "termcolor", ] [[package]] name = "bitflags" -version = "1.3.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "clap" -version = "4.3.3" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8f255e4b8027970e78db75e78831229c9815fdbfa67eb1a1b777a62e24b4a0" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.3" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd4f3c17c83b0ba34ffbc4f8bbd74f079413f747f84a6f89292f138057e36ab" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", "terminal_size", @@ -140,54 +133,54 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "cpp_demangle" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c76f98bdfc7f66172e6c7065f981ebb576ffc903fe4c0561d9f0c2509226dc6" +checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def" dependencies = [ "cfg-if", ] [[package]] name = "csv" -version = "1.2.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" dependencies = [ "csv-core", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" dependencies = [ "memchr", ] @@ -220,44 +213,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] -name = "env_logger" -version = "0.10.0" +name = "env_filter" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ - "humantime", - "is-terminal", "log", "regex", - "termcolor 1.2.0", ] [[package]] -name = "errno" -version = "0.3.1" +name = "env_logger" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ - "cc", "libc", + "windows-sys 0.61.2", ] [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", @@ -266,20 +258,20 @@ dependencies = [ [[package]] name = "goblin" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba24f3858a108b3fd5d6c3d790884f0c4e0a83e092be1d67ef41dd8cbfdbe969" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" dependencies = [ "log", "plain", - "scroll", + "scroll 0.12.0", ] [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -292,100 +284,122 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hexplay" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0962bea6731e28b5a443ba4aa00fe3e4fe7555dadf12012435efb738eeac5898" +checksum = "2da1f4f846e8dcc1b5225caf702924816cabd855e4b46115c334ba09d5254a21" dependencies = [ "atty", - "termcolor 0.3.6", + "termcolor", ] [[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "is-terminal" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.5.2", "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] -name = "is-terminal" -version = "0.4.7" +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jiff" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a87d9b8105c23642f50cbbae03d1f75d8422c5cb98ce7ee9271f7ff7505be6b8" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", ] [[package]] -name = "itoa" -version = "1.0.6" +name = "jiff-static" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "b787bebb543f8969132630c51fd0afab173a86c6abae56ff3b9e5e3e3f9f6e58" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.179" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" + +[[package]] +name = "libredox" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +dependencies = [ + "bitflags", + "libc", +] [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.19" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "metagoblin" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd13fbcddd1841f532824b4fcf7143c2e0bbeaf443041935e928b3e679d0a1" +checksum = "584b0db9765f0425ff1214dd84f3e822ac697c61fc5407cffec6b3d08bfd62d2" dependencies = [ "goblin", "log", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "plain" @@ -393,6 +407,21 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "portable-atomic" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -409,47 +438,50 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "redox_users" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "bitflags", + "getrandom", + "libredox", + "thiserror", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.8.4" +name = "regex-automata" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -458,90 +490,98 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustix" -version = "0.37.20" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "scroll" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" dependencies = [ "scroll_derive", ] +[[package]] +name = "scroll" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1257cd4248b4132760d6524d6dda4e053bc648c9070b960929bf50cfb1e7add" + [[package]] name = "scroll_derive" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] -name = "serde" -version = "1.0.164" +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] [[package]] -name = "syn" -version = "1.0.109" +name = "serde_derive" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "syn", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "syn" -version = "2.0.18" +version = "2.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4" dependencies = [ "proc-macro2", "quote", @@ -561,75 +601,66 @@ dependencies = [ [[package]] name = "termcolor" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83" -dependencies = [ - "wincolor", -] - -[[package]] -name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "terminal_size" -version = "0.2.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ "rustix", - "windows-sys", + "windows-sys 0.60.2", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "winapi" @@ -649,11 +680,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -663,32 +694,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "wincolor" -version = "0.1.6" +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "winapi", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ + "windows-link", "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -697,42 +736,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" diff --git a/Cargo.toml b/Cargo.toml index d14d042..c96ae40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,19 +15,19 @@ include = ["src/**/*", "Cargo.toml", "Cargo.lock", "LICENSE", "README.md", "etc/ [dependencies] atty = "0.2" -hexplay = "0.2" +hexplay = "0.3" termcolor = "1" rustc-demangle = "0.1" -cpp_demangle = "0.4" -scroll = "0.11" +cpp_demangle = "0.5" +scroll = "0.13" prettytable-rs = "0.10" -env_logger = "0.10" +env_logger = "0.11" anyhow = "1" clap = { version = "4", features = ["derive", "wrap_help"] } term = "0.7" [dependencies.metagoblin] -version = "0.9" +version = "0.10" [[bin]] name = "bingrep" diff --git a/src/format.rs b/src/format.rs index 0b643b1..0673ba1 100644 --- a/src/format.rs +++ b/src/format.rs @@ -39,13 +39,18 @@ macro_rules! color_dim { } fn union_demangle(s: &str) -> String { - match rustc_demangle::try_demangle(s) { - Ok(demangled) => demangled.to_string(), - Err(_) => match cpp_demangle::Symbol::new(s) { - Ok(sym) => sym.to_string(), - Err(_) => s.to_owned(), - }, - } + rustc_demangle::try_demangle(s) + .ok() + .map(|v| v.to_string()) + .unwrap_or_else(|| { + match cpp_demangle::Symbol::new(s) + .ok() + .and_then(|s| s.demangle().ok()) + { + Some(sym) => sym, + None => s.to_owned(), + } + }) } pub fn new_table(title: Row) -> Table { diff --git a/src/format_pe.rs b/src/format_pe.rs index 9f2d08a..92ae44d 100644 --- a/src/format_pe.rs +++ b/src/format_pe.rs @@ -304,20 +304,23 @@ fn print_data_directory( // is a file pointer instead. ( Cell::new(""), - offsetx_cell(u64::from(entry.virtual_address)), + offsetx_cell(u64::from(entry.1.virtual_address)), ) } else if let Some(offset) = pe::utils::find_offset( - usize::try_from(entry.virtual_address)?, + usize::try_from(entry.1.virtual_address)?, sections, file_alignment, &pe::options::ParseOptions::default(), ) { ( - addrx_cell(u64::from(entry.virtual_address)), + addrx_cell(u64::from(entry.1.virtual_address)), offsetx_cell(u64::try_from(offset)?), ) } else { - (addrx_cell(u64::from(entry.virtual_address)), Cell::new("")) + ( + addrx_cell(u64::from(entry.1.virtual_address)), + Cell::new(""), + ) }; table.add_row(Row::new(vec![ @@ -325,7 +328,7 @@ fn print_data_directory( str_cell(name), rva, offset, - sz_cell(u64::from(entry.size)), + sz_cell(u64::from(entry.1.size)), ])); } } @@ -829,13 +832,14 @@ impl<'bytes> PortableExecutable<'bytes> { { if let Some(data_directory) = data_directory.as_ref() { if let Some(data_directory_offset) = pe::utils::find_offset( - usize::try_from(data_directory.virtual_address)?, + usize::try_from(data_directory.1.virtual_address)?, &self.pe.sections, optional_header.windows_fields.file_alignment, &pe::options::ParseOptions::default(), ) { let data_directory_offset = u64::try_from(data_directory_offset)?; - let offset_end = data_directory_offset + u64::from(data_directory.size); + let offset_end = + data_directory_offset + u64::from(data_directory.1.size); if offset >= data_directory_offset && offset < offset_end { let name = @@ -845,7 +849,7 @@ impl<'bytes> PortableExecutable<'bytes> { let rva = offset_to_rva( offset, data_directory_offset, - u64::from(data_directory.virtual_address), + u64::from(data_directory.1.virtual_address), ); fmt_addrx(fmt, rva)?; writeln!(fmt)?; diff --git a/src/main.rs b/src/main.rs index f8034bf..e26b14e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -208,9 +208,15 @@ fn run(opt: Opt) -> Result<(), Error> { match object { Object::Elf(elf) => parse_elf_file(opt, &bytes, elf), Object::PE(pe) => parse_pe_file(opt, &bytes, pe), + Object::COFF(coff) => { + // TODO: print/format coff + println!("{coff:?}"); + Ok(()) + } Object::Mach(mach) => parse_mac_file(opt, &bytes, mach), Object::Archive(archive) => parse_archive_file(opt, &bytes, archive), Object::Unknown(magic) => Err(anyhow::anyhow!("Unknown magic: {:#x}", magic)), + default => Err(anyhow::anyhow!("Unknown binary type: {default:?}")), } } From 887517fb52a5c2a1f798a36264463c749bcd7f25 Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 13:34:09 -0800 Subject: [PATCH 3/9] build, format: update to MSRV 1.70; remove atty dep, use std IsTerminal --- Cargo.lock | 1 - Cargo.toml | 3 +-- src/format.rs | 7 ++----- src/format_elf.rs | 6 +++--- src/format_mach.rs | 4 ++-- src/format_pe.rs | 10 +++++----- 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bfc6d9..2502499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,7 +83,6 @@ name = "bingrep" version = "0.11.0" dependencies = [ "anyhow", - "atty", "clap", "cpp_demangle", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index c96ae40..b21a1fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ authors = ["m4b "] name = "bingrep" version = "0.11.0" edition = "2021" -rust-version = "1.64.0" +rust-version = "1.70.0" keywords = ["binary", "elf", "mach", "pe", "cross-platform"] repository = "https://github.com/m4b/bingrep" license = "MIT" @@ -14,7 +14,6 @@ categories = ["command-line-utilities"] include = ["src/**/*", "Cargo.toml", "Cargo.lock", "LICENSE", "README.md", "etc/*"] [dependencies] -atty = "0.2" hexplay = "0.3" termcolor = "1" rustc-demangle = "0.1" diff --git a/src/format.rs b/src/format.rs index 0673ba1..0c0c5e0 100644 --- a/src/format.rs +++ b/src/format.rs @@ -1,4 +1,4 @@ -use std::io::Write; +use std::io::{stdout, IsTerminal, Write}; use prettytable::{format, Cell, Row, Table}; use termcolor::Color::*; @@ -303,10 +303,7 @@ pub(crate) fn print_table_to_stdout( table: &prettytable::Table, force_colorize: bool, ) -> Result<(), std::io::Error> { - match ( - term::stdout(), - atty::is(atty::Stream::Stdout) || force_colorize, - ) { + match (term::stdout(), stdout().is_terminal() || force_colorize) { (Some(mut o), true) => table.print_term(&mut *o), _ => table.print(&mut std::io::stdout()), } diff --git a/src/format_elf.rs b/src/format_elf.rs index 45316bc..6785f71 100644 --- a/src/format_elf.rs +++ b/src/format_elf.rs @@ -1,4 +1,4 @@ -use std::io::Write; +use std::io::{stdout, IsTerminal, Write}; use anyhow::Error; use metagoblin::elf; @@ -57,7 +57,7 @@ impl<'bytes> Elf<'bytes> { } pub fn search(&self, search: &str) -> Result<(), Error> { - let cc = if self.args.color || atty::is(atty::Stream::Stdout) { + let cc = if self.args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never @@ -464,7 +464,7 @@ impl<'bytes> Elf<'bytes> { } pub fn print(&self) -> Result<(), Error> { - let cc = if self.args.color || atty::is(atty::Stream::Stdout) { + let cc = if self.args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never diff --git a/src/format_mach.rs b/src/format_mach.rs index 779c850..08fd115 100644 --- a/src/format_mach.rs +++ b/src/format_mach.rs @@ -1,4 +1,4 @@ -use std::io::Write; +use std::io::{stdout, IsTerminal, Write}; use anyhow::Result; use metagoblin::mach; @@ -272,7 +272,7 @@ impl<'macho> Mach<'macho> { pub fn print(&self) -> Result<()> { let mach = &self.0; - let cc = if self.1.color || atty::is(atty::Stream::Stdout) { + let cc = if self.1.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never diff --git a/src/format_pe.rs b/src/format_pe.rs index 92ae44d..b89925e 100644 --- a/src/format_pe.rs +++ b/src/format_pe.rs @@ -1,5 +1,5 @@ use std::collections::BTreeSet; -use std::io::Write; +use std::io::{stdout, IsTerminal, Write}; use std::num::NonZeroUsize; use anyhow::Error; @@ -683,7 +683,7 @@ impl<'bytes> PortableExecutable<'bytes> { } pub fn print(&self) -> Result<(), Error> { - let cc = if self.args.color || atty::is(atty::Stream::Stdout) { + let cc = if self.args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never @@ -795,7 +795,7 @@ impl<'bytes> PortableExecutable<'bytes> { } pub fn search(&self, search: &str) -> Result<(), Error> { - let cc = if self.args.color || atty::is(atty::Stream::Stdout) { + let cc = if self.args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never @@ -938,7 +938,7 @@ impl<'bytes> PEObjectFile<'bytes> { let args = &self.args; let color = args.color; - let cc = if args.color || atty::is(atty::Stream::Stdout) { + let cc = if args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never @@ -982,7 +982,7 @@ impl<'bytes> PEObjectFile<'bytes> { } pub fn search(&self, search: &str) -> Result<(), Error> { - let cc = if self.args.color || atty::is(atty::Stream::Stdout) { + let cc = if self.args.color || stdout().is_terminal() { ColorChoice::Auto } else { ColorChoice::Never From 8693c5a7b1b1d3fd8d6e15b6993e648747e6b223 Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 13:37:40 -0800 Subject: [PATCH 4/9] build: set version to 0.12.0; update CI workflow to 1.70; update to cache v4; add color feature to env_logger --- .github/workflows/main.yml | 50 +++++++++++++++++++------------------- Cargo.lock | 2 +- Cargo.toml | 4 +-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f315351..709b94c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,8 @@ name: CI on: push: pull_request: - branches: - - master + branches: + - master jobs: test: @@ -15,7 +15,7 @@ jobs: include: - build: MSRV # Minimum supported Rust version os: ubuntu-latest - rust: 1.64.0 + rust: 1.70.0 - build: stable os: ubuntu-latest rust: stable @@ -34,25 +34,25 @@ jobs: env: CARGO_TARGET_DIR: ${{ github.workspace }}/target steps: - - uses: actions/checkout@master - - name: Cache CARGO_HOME - uses: actions/cache@v1 - with: - path: ~/.cargo - key: ${{ runner.os }}-cargo-home-${{ hashFiles('**/Cargo.toml') }} - restore-keys: ${{ runner.os }}-cargo-home - - name: Install Rust - shell: bash - run: | - curl -sSL https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain=none - export PATH="$HOME/.cargo/bin:$PATH" - rustup override set ${{ matrix.rust }} - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: rustfmt - shell: bash - if: runner.os == 'Linux' && matrix.rust == 'stable' - run: | - rustup component add rustfmt - cargo fmt -- --check - - run: cargo build - - run: cargo build --all-targets + - uses: actions/checkout@master + - name: Cache CARGO_HOME + uses: actions/cache@v4 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-home-${{ hashFiles('**/Cargo.toml') }} + restore-keys: ${{ runner.os }}-cargo-home + - name: Install Rust + shell: bash + run: | + curl -sSL https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain=none + export PATH="$HOME/.cargo/bin:$PATH" + rustup override set ${{ matrix.rust }} + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: rustfmt + shell: bash + if: runner.os == 'Linux' && matrix.rust == 'stable' + run: | + rustup component add rustfmt + cargo fmt -- --check + - run: cargo build --verbose + - run: cargo build --all-targets diff --git a/Cargo.lock b/Cargo.lock index 2502499..ea74551 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,7 +80,7 @@ dependencies = [ [[package]] name = "bingrep" -version = "0.11.0" +version = "0.12.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index b21a1fc..486e4fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["m4b "] name = "bingrep" -version = "0.11.0" +version = "0.12.0" edition = "2021" rust-version = "1.70.0" keywords = ["binary", "elf", "mach", "pe", "cross-platform"] @@ -20,7 +20,7 @@ rustc-demangle = "0.1" cpp_demangle = "0.5" scroll = "0.13" prettytable-rs = "0.10" -env_logger = "0.11" +env_logger = { version = "0.11", features = ["color"] } anyhow = "1" clap = { version = "4", features = ["derive", "wrap_help"] } term = "0.7" From babdc3a55d03d24260827c519ac93a7443a2cc12 Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 13:57:58 -0800 Subject: [PATCH 5/9] build: update MSRV and CI workflow to 1.71 --- .github/workflows/main.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 709b94c..33521b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: include: - build: MSRV # Minimum supported Rust version os: ubuntu-latest - rust: 1.70.0 + rust: 1.71.0 - build: stable os: ubuntu-latest rust: stable diff --git a/Cargo.toml b/Cargo.toml index 486e4fd..1dfcd5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ authors = ["m4b "] name = "bingrep" version = "0.12.0" edition = "2021" -rust-version = "1.70.0" +rust-version = "1.71.0" keywords = ["binary", "elf", "mach", "pe", "cross-platform"] repository = "https://github.com/m4b/bingrep" license = "MIT" From f46faad10288d54fe92908ebc3a3987992ab9e45 Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 14:00:43 -0800 Subject: [PATCH 6/9] build: migrate to 2024; update MSRV and CI workflow to 1.85 --- Cargo.toml | 4 ++-- src/format_meta.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1dfcd5d..085c78e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,8 +2,8 @@ authors = ["m4b "] name = "bingrep" version = "0.12.0" -edition = "2021" -rust-version = "1.71.0" +edition = "2024" +rust-version = "1.85.0" keywords = ["binary", "elf", "mach", "pe", "cross-platform"] repository = "https://github.com/m4b/bingrep" license = "MIT" diff --git a/src/format_meta.rs b/src/format_meta.rs index 4895db3..0c5dcee 100644 --- a/src/format_meta.rs +++ b/src/format_meta.rs @@ -1,10 +1,10 @@ use anyhow::Error; -use hexplay::{self, HexViewBuilder, CODEPAGE_ASCII}; +use hexplay::{self, CODEPAGE_ASCII, HexViewBuilder}; use metagoblin::{Object, Tag}; -use prettytable::{row, Cell, Row}; +use prettytable::{Cell, Row, row}; -use crate::format::*; use crate::Opt; +use crate::format::*; const SCALE: [char; 100] = [' '; 100]; @@ -32,7 +32,7 @@ impl<'bytes> Meta<'bytes> { pub fn print_ranges(&self) -> Result<(), Error> { let buffer = &self.bytes; let mut franges = self.analysis.franges.iter().collect::>(); - franges.sort_by(|&(ref r1, _), &(ref r2, _)| r2.len().cmp(&r1.len())); + franges.sort_by(|&(r1, _), &(r2, _)| r2.len().cmp(&r1.len())); let spaces = (0_usize..100) .map(|e| if e % 2 == 0 { "0" } else { "1" }) .collect::(); From 30eecb6e81b91ad86fcbb4e6a77a496489f25f2d Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 14:02:02 -0800 Subject: [PATCH 7/9] build: cargo fmt for 2024 edition --- src/format.rs | 4 ++-- src/format_archive.rs | 4 ++-- src/format_elf.rs | 36 +++++++++++++++++++----------------- src/format_mach.rs | 6 +++--- src/format_pe.rs | 10 +++++----- src/main.rs | 4 ++-- 6 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/format.rs b/src/format.rs index 0c0c5e0..87511de 100644 --- a/src/format.rs +++ b/src/format.rs @@ -1,6 +1,6 @@ -use std::io::{stdout, IsTerminal, Write}; +use std::io::{IsTerminal, Write, stdout}; -use prettytable::{format, Cell, Row, Table}; +use prettytable::{Cell, Row, Table, format}; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, WriteColor}; diff --git a/src/format_archive.rs b/src/format_archive.rs index f1ce118..4a6b846 100644 --- a/src/format_archive.rs +++ b/src/format_archive.rs @@ -1,9 +1,9 @@ use anyhow::Error; use metagoblin::archive; -use prettytable::{row, Cell, Row}; +use prettytable::{Cell, Row, row}; -use crate::format::*; use crate::Opt; +use crate::format::*; pub struct Archive<'archive> { archive: archive::Archive<'archive>, diff --git a/src/format_elf.rs b/src/format_elf.rs index 6785f71..aadc137 100644 --- a/src/format_elf.rs +++ b/src/format_elf.rs @@ -1,19 +1,19 @@ -use std::io::{stdout, IsTerminal, Write}; +use std::io::{IsTerminal, Write, stdout}; use anyhow::Error; use metagoblin::elf; use metagoblin::elf::{ - dynamic, header, program_header, reloc, section_header, sym, Dynamic, RelocSection, + Dynamic, RelocSection, dynamic, header, program_header, reloc, section_header, sym, }; use metagoblin::strtab::Strtab; -use prettytable::{row, Cell, Row, Table}; -use scroll::ctx::StrCtx; +use prettytable::{Cell, Row, Table, row}; use scroll::Pread; +use scroll::ctx::StrCtx; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, ColorChoice, ColorSpec, WriteColor}; -use crate::format::*; use crate::Opt; +use crate::format::*; type Syms = Vec; @@ -155,7 +155,7 @@ impl<'bytes> Elf<'bytes> { } fn ph_name_table(phdr: &elf::ProgramHeader) -> Cell { - use program_header::{pt_to_str, PT_DYNAMIC, PT_INTERP, PT_LOAD}; + use program_header::{PT_DYNAMIC, PT_INTERP, PT_LOAD, pt_to_str}; let name = pt_to_str(phdr.p_type); match phdr.p_type { @@ -430,9 +430,9 @@ impl<'bytes> Elf<'bytes> { fn print_dynamic_symbol(&self, fmt: &mut Buffer, dyn_sym: &elf::Dyn) -> Result<(), Error> { use dynamic::{ - tag_to_str, DT_FINI, DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_GNU_HASH, DT_INIT, - DT_INIT_ARRAY, DT_INIT_ARRAYSZ, DT_JMPREL, DT_NEEDED, DT_PLTGOT, DT_PLTRELSZ, DT_RELA, - DT_RELASZ, DT_RPATH, DT_STRSZ, DT_STRTAB, DT_SYMTAB, DT_VERNEED, DT_VERSYM, + DT_FINI, DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_GNU_HASH, DT_INIT, DT_INIT_ARRAY, + DT_INIT_ARRAYSZ, DT_JMPREL, DT_NEEDED, DT_PLTGOT, DT_PLTRELSZ, DT_RELA, DT_RELASZ, + DT_RPATH, DT_STRSZ, DT_STRTAB, DT_SYMTAB, DT_VERNEED, DT_VERSYM, tag_to_str, }; fmt_cyan(fmt, &format!("{:>16} ", tag_to_str(dyn_sym.d_tag)))?; @@ -491,14 +491,16 @@ impl<'bytes> Elf<'bytes> { fmt_off(fmt, header.e_phoff)?; write!(fmt, " e_shoff: ")?; fmt_off(fmt, header.e_shoff)?; - writeln!(fmt, " e_flags: {:#x} e_ehsize: {} e_phentsize: {} e_phnum: {} e_shentsize: {} e_shnum: {} e_shstrndx: {}", - header.e_flags, - header.e_ehsize, - header.e_phentsize, - header.e_phnum, - header.e_shentsize, - header.e_shnum, - header.e_shstrndx, + writeln!( + fmt, + " e_flags: {:#x} e_ehsize: {} e_phentsize: {} e_phnum: {} e_shentsize: {} e_shnum: {} e_shstrndx: {}", + header.e_flags, + header.e_ehsize, + header.e_phentsize, + header.e_phnum, + header.e_shentsize, + header.e_shnum, + header.e_shstrndx, )?; writeln!(fmt)?; diff --git a/src/format_mach.rs b/src/format_mach.rs index 08fd115..6d06699 100644 --- a/src/format_mach.rs +++ b/src/format_mach.rs @@ -1,16 +1,16 @@ -use std::io::{stdout, IsTerminal, Write}; +use std::io::{IsTerminal, Write, stdout}; use anyhow::Result; use metagoblin::mach; use metagoblin::mach::exports::Export; use metagoblin::mach::header; use metagoblin::mach::load_command; -use prettytable::{row, Cell, Row, Table}; +use prettytable::{Cell, Row, Table, row}; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, ColorChoice, ColorSpec, WriteColor}; -use crate::format::*; use crate::Opt; +use crate::format::*; pub struct Mach<'macho>(pub mach::MachO<'macho>, pub Opt); diff --git a/src/format_pe.rs b/src/format_pe.rs index b89925e..f26d215 100644 --- a/src/format_pe.rs +++ b/src/format_pe.rs @@ -1,5 +1,5 @@ use std::collections::BTreeSet; -use std::io::{stdout, IsTerminal, Write}; +use std::io::{IsTerminal, Write, stdout}; use std::num::NonZeroUsize; use anyhow::Error; @@ -10,14 +10,14 @@ use metagoblin::pe::export::{Export, Reexport}; use metagoblin::pe::header::*; use metagoblin::pe::import::Import; use metagoblin::pe::optional_header::OptionalHeader; -use metagoblin::pe::section_table::{SectionTable, IMAGE_SCN_ALIGN_MASK}; -use prettytable::{row, Cell, Row}; -use scroll::ctx::StrCtx; +use metagoblin::pe::section_table::{IMAGE_SCN_ALIGN_MASK, SectionTable}; +use prettytable::{Cell, Row, row}; use scroll::Pread; +use scroll::ctx::StrCtx; use termcolor::{Buffer, BufferWriter, Color, ColorChoice, ColorSpec, WriteColor}; -use crate::format::*; use crate::Opt; +use crate::format::*; /// Device drivers and native Windows processes. const IMAGE_SUBSYSTEM_NATIVE: u16 = 1; diff --git a/src/main.rs b/src/main.rs index e26b14e..85abb50 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,13 +11,13 @@ use std::path::Path; use anyhow::Error; use clap::Parser; -use metagoblin::{archive, elf, mach, pe, Hint, Object}; +use metagoblin::{Hint, Object, archive, elf, mach, pe}; use crate::format_archive::Archive; use crate::format_elf::Elf; use crate::format_mach::Mach; use crate::format_meta::Meta; -use crate::format_pe::{is_pe_object_file_header, PEObjectFile, PortableExecutable}; +use crate::format_pe::{PEObjectFile, PortableExecutable, is_pe_object_file_header}; #[derive(Parser, Debug, Clone)] #[clap( From c936c894d72186de2f94164b517c03709fd7852e Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 14:06:22 -0800 Subject: [PATCH 8/9] build: set the workflow to use 1.85 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 33521b7..a5f27ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: include: - build: MSRV # Minimum supported Rust version os: ubuntu-latest - rust: 1.71.0 + rust: 1.85.0 - build: stable os: ubuntu-latest rust: stable From ede99612dcfdd9870cc672866a9703328bc468f6 Mon Sep 17 00:00:00 2001 From: m4b Date: Sun, 4 Jan 2026 14:47:22 -0800 Subject: [PATCH 9/9] build: set scroll back to 0.12; revert formatting; and reset edition to 2021 and rust version to 1.74; we'll bounce to new edition with latest goblin, which requires scroll 0.13 --- .github/workflows/main.yml | 2 +- Cargo.lock | 10 ++-------- Cargo.toml | 6 +++--- src/format.rs | 4 ++-- src/format_archive.rs | 4 ++-- src/format_elf.rs | 18 +++++++++--------- src/format_mach.rs | 6 +++--- src/format_meta.rs | 6 +++--- src/format_pe.rs | 10 +++++----- src/main.rs | 4 ++-- 10 files changed, 32 insertions(+), 38 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5f27ff..02f6c68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: include: - build: MSRV # Minimum supported Rust version os: ubuntu-latest - rust: 1.85.0 + rust: 1.74.0 - build: stable os: ubuntu-latest rust: stable diff --git a/Cargo.lock b/Cargo.lock index ea74551..1e060eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ dependencies = [ "metagoblin", "prettytable-rs", "rustc-demangle", - "scroll 0.13.0", + "scroll", "term", "termcolor", ] @@ -263,7 +263,7 @@ checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" dependencies = [ "log", "plain", - "scroll 0.12.0", + "scroll", ] [[package]] @@ -533,12 +533,6 @@ dependencies = [ "scroll_derive", ] -[[package]] -name = "scroll" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1257cd4248b4132760d6524d6dda4e053bc648c9070b960929bf50cfb1e7add" - [[package]] name = "scroll_derive" version = "0.12.1" diff --git a/Cargo.toml b/Cargo.toml index 085c78e..c5e8eaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,8 +2,8 @@ authors = ["m4b "] name = "bingrep" version = "0.12.0" -edition = "2024" -rust-version = "1.85.0" +edition = "2021" +rust-version = "1.74.0" keywords = ["binary", "elf", "mach", "pe", "cross-platform"] repository = "https://github.com/m4b/bingrep" license = "MIT" @@ -18,7 +18,7 @@ hexplay = "0.3" termcolor = "1" rustc-demangle = "0.1" cpp_demangle = "0.5" -scroll = "0.13" +scroll = "0.12" prettytable-rs = "0.10" env_logger = { version = "0.11", features = ["color"] } anyhow = "1" diff --git a/src/format.rs b/src/format.rs index 87511de..0c0c5e0 100644 --- a/src/format.rs +++ b/src/format.rs @@ -1,6 +1,6 @@ -use std::io::{IsTerminal, Write, stdout}; +use std::io::{stdout, IsTerminal, Write}; -use prettytable::{Cell, Row, Table, format}; +use prettytable::{format, Cell, Row, Table}; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, WriteColor}; diff --git a/src/format_archive.rs b/src/format_archive.rs index 4a6b846..f1ce118 100644 --- a/src/format_archive.rs +++ b/src/format_archive.rs @@ -1,9 +1,9 @@ use anyhow::Error; use metagoblin::archive; -use prettytable::{Cell, Row, row}; +use prettytable::{row, Cell, Row}; -use crate::Opt; use crate::format::*; +use crate::Opt; pub struct Archive<'archive> { archive: archive::Archive<'archive>, diff --git a/src/format_elf.rs b/src/format_elf.rs index aadc137..94163fc 100644 --- a/src/format_elf.rs +++ b/src/format_elf.rs @@ -1,19 +1,19 @@ -use std::io::{IsTerminal, Write, stdout}; +use std::io::{stdout, IsTerminal, Write}; use anyhow::Error; use metagoblin::elf; use metagoblin::elf::{ - Dynamic, RelocSection, dynamic, header, program_header, reloc, section_header, sym, + dynamic, header, program_header, reloc, section_header, sym, Dynamic, RelocSection, }; use metagoblin::strtab::Strtab; -use prettytable::{Cell, Row, Table, row}; -use scroll::Pread; +use prettytable::{row, Cell, Row, Table}; use scroll::ctx::StrCtx; +use scroll::Pread; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, ColorChoice, ColorSpec, WriteColor}; -use crate::Opt; use crate::format::*; +use crate::Opt; type Syms = Vec; @@ -155,7 +155,7 @@ impl<'bytes> Elf<'bytes> { } fn ph_name_table(phdr: &elf::ProgramHeader) -> Cell { - use program_header::{PT_DYNAMIC, PT_INTERP, PT_LOAD, pt_to_str}; + use program_header::{pt_to_str, PT_DYNAMIC, PT_INTERP, PT_LOAD}; let name = pt_to_str(phdr.p_type); match phdr.p_type { @@ -430,9 +430,9 @@ impl<'bytes> Elf<'bytes> { fn print_dynamic_symbol(&self, fmt: &mut Buffer, dyn_sym: &elf::Dyn) -> Result<(), Error> { use dynamic::{ - DT_FINI, DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_GNU_HASH, DT_INIT, DT_INIT_ARRAY, - DT_INIT_ARRAYSZ, DT_JMPREL, DT_NEEDED, DT_PLTGOT, DT_PLTRELSZ, DT_RELA, DT_RELASZ, - DT_RPATH, DT_STRSZ, DT_STRTAB, DT_SYMTAB, DT_VERNEED, DT_VERSYM, tag_to_str, + tag_to_str, DT_FINI, DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_GNU_HASH, DT_INIT, + DT_INIT_ARRAY, DT_INIT_ARRAYSZ, DT_JMPREL, DT_NEEDED, DT_PLTGOT, DT_PLTRELSZ, DT_RELA, + DT_RELASZ, DT_RPATH, DT_STRSZ, DT_STRTAB, DT_SYMTAB, DT_VERNEED, DT_VERSYM, }; fmt_cyan(fmt, &format!("{:>16} ", tag_to_str(dyn_sym.d_tag)))?; diff --git a/src/format_mach.rs b/src/format_mach.rs index 6d06699..08fd115 100644 --- a/src/format_mach.rs +++ b/src/format_mach.rs @@ -1,16 +1,16 @@ -use std::io::{IsTerminal, Write, stdout}; +use std::io::{stdout, IsTerminal, Write}; use anyhow::Result; use metagoblin::mach; use metagoblin::mach::exports::Export; use metagoblin::mach::header; use metagoblin::mach::load_command; -use prettytable::{Cell, Row, Table, row}; +use prettytable::{row, Cell, Row, Table}; use termcolor::Color::*; use termcolor::{Buffer, BufferWriter, ColorChoice, ColorSpec, WriteColor}; -use crate::Opt; use crate::format::*; +use crate::Opt; pub struct Mach<'macho>(pub mach::MachO<'macho>, pub Opt); diff --git a/src/format_meta.rs b/src/format_meta.rs index 0c5dcee..6d7d91d 100644 --- a/src/format_meta.rs +++ b/src/format_meta.rs @@ -1,10 +1,10 @@ use anyhow::Error; -use hexplay::{self, CODEPAGE_ASCII, HexViewBuilder}; +use hexplay::{self, HexViewBuilder, CODEPAGE_ASCII}; use metagoblin::{Object, Tag}; -use prettytable::{Cell, Row, row}; +use prettytable::{row, Cell, Row}; -use crate::Opt; use crate::format::*; +use crate::Opt; const SCALE: [char; 100] = [' '; 100]; diff --git a/src/format_pe.rs b/src/format_pe.rs index f26d215..b89925e 100644 --- a/src/format_pe.rs +++ b/src/format_pe.rs @@ -1,5 +1,5 @@ use std::collections::BTreeSet; -use std::io::{IsTerminal, Write, stdout}; +use std::io::{stdout, IsTerminal, Write}; use std::num::NonZeroUsize; use anyhow::Error; @@ -10,14 +10,14 @@ use metagoblin::pe::export::{Export, Reexport}; use metagoblin::pe::header::*; use metagoblin::pe::import::Import; use metagoblin::pe::optional_header::OptionalHeader; -use metagoblin::pe::section_table::{IMAGE_SCN_ALIGN_MASK, SectionTable}; -use prettytable::{Cell, Row, row}; -use scroll::Pread; +use metagoblin::pe::section_table::{SectionTable, IMAGE_SCN_ALIGN_MASK}; +use prettytable::{row, Cell, Row}; use scroll::ctx::StrCtx; +use scroll::Pread; use termcolor::{Buffer, BufferWriter, Color, ColorChoice, ColorSpec, WriteColor}; -use crate::Opt; use crate::format::*; +use crate::Opt; /// Device drivers and native Windows processes. const IMAGE_SUBSYSTEM_NATIVE: u16 = 1; diff --git a/src/main.rs b/src/main.rs index 85abb50..e26b14e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,13 +11,13 @@ use std::path::Path; use anyhow::Error; use clap::Parser; -use metagoblin::{Hint, Object, archive, elf, mach, pe}; +use metagoblin::{archive, elf, mach, pe, Hint, Object}; use crate::format_archive::Archive; use crate::format_elf::Elf; use crate::format_mach::Mach; use crate::format_meta::Meta; -use crate::format_pe::{PEObjectFile, PortableExecutable, is_pe_object_file_header}; +use crate::format_pe::{is_pe_object_file_header, PEObjectFile, PortableExecutable}; #[derive(Parser, Debug, Clone)] #[clap(