Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ nix = { version = "0.25", default-features = false, features = [
"user",
] }

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.42"
features = [
# MiniDumpWriteDump requires...a lot of features
"Win32_Foundation",
"Win32_Storage_FileSystem",
"Win32_System_Diagnostics_Debug",
"Win32_System_Kernel",
"Win32_System_Memory",
# GetCurrentThreadId & OpenProcess
"Win32_System_Threading",
]

[target.'cfg(target_os = "macos")'.dependencies]
# Binds some additional mac specifics not in libc
mach2 = "0.4"
Expand Down
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
println!("cargo:rustc-link-lib=dylib=dbghelp");
}
}
9 changes: 5 additions & 4 deletions src/bin/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,13 @@ mod linux {

#[cfg(target_os = "windows")]
mod windows {
use minidump_writer::ffi::{
GetCurrentProcessId, GetCurrentThread, GetCurrentThreadId, GetThreadContext, CONTEXT,
EXCEPTION_POINTERS, EXCEPTION_RECORD,
};

use super::*;
use std::mem;
use windows_sys::Win32::System::{
Diagnostics::Debug::{GetThreadContext, CONTEXT, EXCEPTION_POINTERS, EXCEPTION_RECORD},
Threading::{GetCurrentProcessId, GetCurrentThread, GetCurrentThreadId},
};

#[inline(never)]
pub(super) fn real_main(args: Vec<String>) -> Result<()> {
Expand Down
1 change: 1 addition & 0 deletions src/windows.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod errors;
pub mod ffi;
pub mod minidump_writer;
Loading