$ xref dump
On this page
Parallel modular pseudo-C dump grouped by recovered Rust source paths (<OUT>/crate/src/mod.c).
Groups stripped functions by embedded Rust panic file paths and writes modular .c files in parallel. Stdout and generated file preview are shown separately below.
Usage
xref dump [OPTIONS] --out <OUT>
Arguments and options
Options
--out <OUT>.c module files.--src <SRC>src/loops.rs).--fields->f_<off> field hints.--gotoExamples
All examples were recorded on public binaries; see Provenance.
Dump --out out-loops --src src/loops.rs
Exports the 4 functions attributed to src/loops.rs into out-loops/src/loops.c.
$ xref -b xref.stripped dump --out out-loops --src src/loops.rs
dumped 4 functions into 1 files (12738 bytes) in out-loops (5.4ms)
xref: load 604.8µs, total 6.1ms
Reading the output
- stdout is one summary line: how many functions went into how many files, the bytes written, the output directory and the time.
- The files are
<OUT>/<crate>/src/<module>.c, one per recovered Rust source path; each holds the pseudo-C of the functions whose panic locations point to that file.
Limits
- Functions are grouped by the source paths of their panic locations; functions without any panic location are not exported by
--src.
Provenance
Recorded with a development build of xref after 0.4.0 on Linux x86-64, on xref.stripped = a stripped xref build (the binary of the home-page examples). Output is unchanged except that whitespace at the end of each line and empty lines at the end of the output are removed; long outputs are cut where marked.
Source: docs/cli/dump.md · generated for the site; edit the Markdown, not this page.