4 releases

0.2.2 Mar 29, 2024
0.2.1 Sep 21, 2023
0.2.0 Jul 1, 2023
0.1.0 Oct 23, 2022

#204 in Operating systems

Download history 638/week @ 2024-07-23 1014/week @ 2024-07-30 810/week @ 2024-08-06 680/week @ 2024-08-13 751/week @ 2024-08-20 566/week @ 2024-08-27 422/week @ 2024-09-03 511/week @ 2024-09-10 777/week @ 2024-09-17 1238/week @ 2024-09-24 1282/week @ 2024-10-01 1280/week @ 2024-10-08 1348/week @ 2024-10-15 1382/week @ 2024-10-22 1092/week @ 2024-10-29 1153/week @ 2024-11-05

5,270 downloads per month
Used in 3 crates (via sentry-rust-minidump)

MIT/Apache

14KB
284 lines

minidumper-child

Master branch integration test status

Essentially takes the code from the minidumper diskwrite example and packages it in reusable form with some integration tests. This wraps the minidumper and crash-handler crates to capture and send minidumps from a separate crash reporting process.

It spawns the current executable again with an argument that causes it to start in crash reporter mode. In this mode it waits for minidump notification from the main app process and passes the minidump file to a user defined closure.

[dependencies]
minidumper-child = "0.1"
use minidumper_child::MinidumperChild;

fn main() {
    // Everything before here runs in both app and crash reporter processes
    let _guard = MinidumperChild::new()
        .on_minidump(|buffer: Vec<u8>, path: &Path| {
            // Do something with the minidump file here
        })
        .spawn();
    // Everything after here will only run in the app process

    App::run();

    // This will cause on_minidump to be called in the crash reporter process 
    #[allow(deref_nullptr)]
    unsafe {
        *std::ptr::null_mut() = true;
    }
}

Dependencies

~5–15MB
~206K SLoC