2 releases

0.1.0-alpha.1 Feb 23, 2024
0.0.0 Nov 21, 2023

#481 in Debugging

Download history 4/week @ 2024-02-14 298/week @ 2024-02-21 87/week @ 2024-02-28 15/week @ 2024-03-06 11/week @ 2024-03-13 16/week @ 2024-03-27 28/week @ 2024-04-03

57 downloads per month

BSD-3-Clause

665KB
14K SLoC

pipeline crates.io rustc

blazesym-c

blazesym-c provides C language bindings for the blazesym library.

Build & Use

blazesym-c requires a standard Rust toolchain and can be built using the Cargo project manager (e.g., cargo build).

The build will produce libblazesym_c.a as well as libblazesym_c.so in the respective target folder (e.g., <project-root>/target/debug/).

In your C programs include blazesym.h (provided as part of the crate) from your source code and then link against the static or shared library, respectively. When linking statically, you may also need to link:

-lrt -ldl -lpthread -lm

An example of usage of the C API is in available in libbpf-bootstrap: https://github.com/libbpf/libbpf-bootstrap/blob/master/examples/c/profile.c

This example periodically samples the running process of every processor in a system and prints their stack traces.

A detailed documentation of the C API is available as part of the Rust documentation or can be generated locally from the current repository snapshot using cargo doc.

Dependencies

~0–1.2MB
~12K SLoC