blazesym-c

Crates.ioblazesym-c
lib.rsblazesym-c
version0.1.0-rc.2
sourcesrc
created_at2023-11-21 22:42:36.514848
updated_at2024-11-05 18:58:08.409921
descriptionC bindings for blazesym
homepage
repositoryhttps://github.com/libbpf/blazesym
max_upload_size
id1044698
size202,832
Daniel Müller (d-e-s-o)

documentation

README

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.

Commit count: 1403

cargo fmt