diff --git a/Cargo.lock b/Cargo.lock index 1537dd90f1..30a7ce4221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,7 +6,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c" dependencies = [ - "gimli", + "gimli 0.21.0", ] [[package]] @@ -46,6 +46,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "anyhow" +version = "1.0.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" + [[package]] name = "anylog" version = "0.5.0" @@ -340,6 +346,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "cloudabi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" +dependencies = [ + "bitflags", +] + [[package]] name = "colored" version = "1.9.3" @@ -561,9 +576,9 @@ dependencies = [ [[package]] name = "dmsort" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc94b97c995cfd2f02fc3972ae0f385cd441b50bb7610b59c7c779d5aec7444" +checksum = "d4699f5cb7678f099b747ffdc1e6ce6cdc42579e29d28315aa715b9fd10324fc" [[package]] name = "doc-comment" @@ -773,6 +788,12 @@ name = "gimli" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" + +[[package]] +name = "gimli" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" dependencies = [ "fallible-iterator", "stable_deref_trait", @@ -831,6 +852,15 @@ dependencies = [ "autocfg 1.0.0", ] +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "hermit-abi" version = "0.1.14" @@ -863,6 +893,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "idna" version = "0.1.5" @@ -1018,6 +1054,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" +[[package]] +name = "leb128" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" + [[package]] name = "libc" version = "0.2.71" @@ -1072,6 +1114,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.8" @@ -1319,8 +1370,19 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.2", + "parking_lot_core 0.8.0", ] [[package]] @@ -1330,7 +1392,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if", - "cloudabi", + "cloudabi 0.0.3", + "libc", + "redox_syscall", + "smallvec", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +dependencies = [ + "cfg-if", + "cloudabi 0.1.0", + "instant", "libc", "redox_syscall", "smallvec", @@ -1578,7 +1655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1497e40855348e4a8a40767d8e55174bce1e445a3ac9254ad44ad468ee0485af" dependencies = [ "log", - "parking_lot", + "parking_lot 0.10.2", "scheduled-thread-pool", ] @@ -1702,7 +1779,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi", + "cloudabi 0.0.3", "fuchsia-cprng", "libc", "rand_core 0.4.2", @@ -1909,7 +1986,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0988d7fdf88d5e5fcf5923a0f1e8ab345f3e98ab4bc6bc45a2d5ff7f7458fbf6" dependencies = [ - "parking_lot", + "parking_lot 0.10.2", ] [[package]] @@ -2037,7 +2114,7 @@ dependencies = [ "open", "openssl-probe", "osascript", - "parking_lot", + "parking_lot 0.10.2", "percent-encoding 2.1.0", "plist", "predicates", @@ -2265,8 +2342,7 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "symbolic" version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c1372a324a0765d0193d79eed3a76689023c5639ab5753f81ebcc05a246b98" +source = "git+https://github.com/getsentry/symbolic#075ee512324df66bd5df6f358174244498a85756" dependencies = [ "symbolic-common", "symbolic-debuginfo", @@ -2275,11 +2351,9 @@ dependencies = [ [[package]] name = "symbolic-common" version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97c98b6026c932123a976d0cd35f59256424507e3dec9d032f30828765f1bf2" +source = "git+https://github.com/getsentry/symbolic#075ee512324df66bd5df6f358174244498a85756" dependencies = [ "debugid", - "failure", "memmap", "serde", "stable_deref_trait", @@ -2289,18 +2363,16 @@ dependencies = [ [[package]] name = "symbolic-debuginfo" version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da05d4245f95dc3b263f76bb5ac6d2eb41caa4df90d9223f8a9e74398da758cb" +source = "git+https://github.com/getsentry/symbolic#075ee512324df66bd5df6f358174244498a85756" dependencies = [ "dmsort", - "failure", "fallible-iterator", "flate2", - "gimli", + "gimli 0.22.0", "goblin", "lazy_static", "lazycell", - "parking_lot", + "parking_lot 0.11.1", "pdb", "pest", "pest_derive", @@ -2309,6 +2381,9 @@ dependencies = [ "serde_json", "smallvec", "symbolic-common", + "thiserror", + "walrus", + "wasmparser 0.68.0", "zip", ] @@ -2421,6 +2496,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "thiserror" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab" +dependencies = [ + "proc-macro2 1.0.18", + "quote 1.0.7", + "syn 1.0.33", +] + [[package]] name = "thread_local" version = "1.0.1" @@ -2491,6 +2586,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" + [[package]] name = "unicode-width" version = "0.1.8" @@ -2594,12 +2695,50 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "walrus" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d470d0583e65f4cab21a1ff3c1ba3dd23ae49e68f516f0afceaeb001b32af39" +dependencies = [ + "anyhow", + "id-arena", + "leb128", + "log", + "walrus-macro", + "wasmparser 0.59.0", +] + +[[package]] +name = "walrus-macro" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c2bb690b44cb1b0fdcc54d4998d21f8bdaf706b93775425e440b174f39ad16" +dependencies = [ + "heck", + "proc-macro2 1.0.18", + "quote 1.0.7", + "syn 1.0.33", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasmparser" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9" + +[[package]] +name = "wasmparser" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a00e14eed9c2ecbbdbdd4fb284f49d21b6808965de24769a6379a13ec47d4c" + [[package]] name = "which" version = "3.1.1" diff --git a/Cargo.toml b/Cargo.toml index acf3657347..bcabc4517a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,3 +88,6 @@ crossbeam-channel = "0.4.2" [profile.release] opt-level = 3 panic = "abort" + +[patch.crates-io] +symbolic = { git = "https://github.com/getsentry/symbolic" } diff --git a/src/utils/dif.rs b/src/utils/dif.rs index d1403bb228..4c84535a1b 100644 --- a/src/utils/dif.rs +++ b/src/utils/dif.rs @@ -19,6 +19,7 @@ pub enum DifType { SourceBundle, Pe, Pdb, + Wasm, } impl DifType { @@ -31,6 +32,7 @@ impl DifType { DifType::SourceBundle => "sourcebundle", DifType::Breakpad => "breakpad", DifType::Proguard => "proguard", + DifType::Wasm => "wasm", } } } @@ -53,6 +55,7 @@ impl str::FromStr for DifType { "sourcebundle" => Ok(DifType::SourceBundle), "breakpad" => Ok(DifType::Breakpad), "proguard" => Ok(DifType::Proguard), + "wasm" => Ok(DifType::Wasm), _ => bail!("Invalid debug info file type"), } } @@ -189,6 +192,7 @@ impl DifFile<'static> { | FileFormat::Pe | FileFormat::Pdb | FileFormat::Breakpad + | FileFormat::Wasm | FileFormat::SourceBundle => return DifFile::from_archive(archive), FileFormat::Unknown => (), // fallthrough } @@ -211,6 +215,7 @@ impl DifFile<'static> { Some(DifType::Pe) => DifFile::open_object(path, FileFormat::Pe), Some(DifType::Pdb) => DifFile::open_object(path, FileFormat::Pdb), Some(DifType::SourceBundle) => DifFile::open_object(path, FileFormat::SourceBundle), + Some(DifType::Wasm) => DifFile::open_object(path, FileFormat::Wasm), Some(DifType::Breakpad) => DifFile::open_object(path, FileFormat::Breakpad), Some(DifType::Proguard) => DifFile::open_proguard(path), None => DifFile::try_open(path), @@ -242,6 +247,7 @@ impl<'a> DifFile<'a> { FileFormat::Elf => DifType::Elf, FileFormat::Pdb => DifType::Pdb, FileFormat::Pe => DifType::Pe, + FileFormat::Wasm => DifType::Wasm, FileFormat::SourceBundle => DifType::SourceBundle, FileFormat::Unknown => unreachable!(), },