XRef Code releases
6 releases from 2026-11-01 to 2026-11-02, 12 downloads of release files.
v0.1.0latest
XRef Code v0.1.0
Zero-index x86-64 ELF cross-references, .eh_frame function discovery, backward program slicing, struct displacement recovery, and goto-free structured pseudo-C — written in pure safe Rust (#![forbid(unsafe_code)]).
- Website & Recorded Workbench: https://xrefcode.com
- Zenodo Archival Record (
v0.1.0): https://doi.org/10.5281/zenodo.23878790 (concept DOI for all versions: https://doi.org/10.5281/zenodo.23878789) - Documentation & CLI Reference (
v0.1.0):README.mdatv0.1.0
Install
Homebrew (macOS Apple Silicon & Linux x86_64)
brew tap alex09x/apps
brew install xref
Cargo (rustc 1.88+)
cargo install --git https://github.com/alex09x/xref --tag v0.1.0 --locked
Prebuilt Binaries
| Platform | Archive | SHA-256 |
|---|---|---|
Linux x86_64 (glibc >= 2.34) |
xref-v0.1.0-x86_64-unknown-linux-gnu.tar.gz |
30a6ac3303bfe86e4f23de10b5382bd56fb65df605c3e4cbced495e15e9d77de |
macOS Apple Silicon (arm64) |
xref-v0.1.0-aarch64-apple-darwin.tar.gz |
9652793f0ee814c9dc212c54739b0e1b6bfc1f9ab30ef6c3fe4af65a805858b0 |
Citation
- Alexander Panasenko (2026). XRef Code — Ultra Blazing Fast x86-64 ELF Cross-References & Pseudo-C Decompiler (v0.1.0). Zenodo. https://doi.org/10.5281/zenodo.23878790 (concept DOI: https://doi.org/10.5281/zenodo.23878789)
Highlights in v0.1.0
- Zero-index
.eh_framediscovery & parallel queries (stats,sym,func,refs,istr,imm,disp,callers,calls,args,find,path,tree,asm,error,variant,arm,src,where,files): mapsx86-64ELF images directly in memory, extracts function ranges from.eh_frameunwind records (with heuristic span fallback), and scans functions across CPU cores viarayonwithout upfront project database files. Recorded single-run wall-clock times fromxref 0.0.5on self-hostedxref.stripped(68aa57b,1.96 MB,AMD Ryzen 9 9950X, warm page cache) are documented inREADME.md#recorded-performance. - Goto-free structured typed pseudo-C (
c/decomp,--fields): liftsx86-64machine code via SSA lifting, dead-code elimination, condition folding, 1-operand wideningmul/imul/div/idiv, multi-precisionadc/sbb, stripped Rust panic and(ptr, len)&strrecognition, and structuredif/else/while/do-while/switchregions (0gotos across the 7 recorded workbench functions). - Static struct displacement & stride recovery (
layout,disp --lea,--stride): aggregates non-stack memory displacements, access widths, read/write/leacounts, SIB array strides, and 1-hop callee pointer forwarding per argument register. - Backward program slicing, cross-build diffing & modular export (
slice,match/diff,diff-c,dump): isolates balanced statements and control guards reaching a target call/address/string, matches shifted functions across stripped builds, diffs normalized pseudo-C, and exports modular.cfiles grouped by recovered Rust panic source paths. - Scope & Limitations:
x86-64ELF executables and shared objects only (PE,Mach-O, andAArch64are out of scope; end-to-end tests intests/fixture.rsand recorded runs indocs/recorded-data.jsatv0.1.0cover Rust binaries).
Downloads
- SHA256SUMS216 B · 1 downloads
- xref-v0.1.0-aarch64-apple-darwin.tar.gz893 KB · 4 downloads
- xref-v0.1.0-aarch64-apple-darwin.tar.gz.sha256106 B · 2 downloads
- xref-v0.1.0-x86_64-unknown-linux-gnu.tar.gz1.0 MB · 4 downloads
- xref-v0.1.0-x86_64-unknown-linux-gnu.tar.gz.sha256110 B · 1 downloads
- Source code (tar.gz)
- Source code (zip)
v0.0.5
Highlights
- 1-Operand Widening ALU, Sign-Extension & Multi-Precision Carry/Borrow (
xref c/xref slice/xref dump/xref diff-c):- Lifts x86_64 1-operand widening
mul/imul(8/16/32/64-bit, collapsing high/lowu128/i128splits into clean wide shifts/casts when both halves are consumed and preserving upper register bits on8/16-bit subword writes). - Lifts 1-operand
div/idiv(8/16/32/64-bit) with zero-extended low halves ((u128)(u64)), SSA-provencbw/cwd/cdq/cqosign-extension folding onidiv, and accumulator sign-extension instructions (cbw,cwde,cdqe,cwd,cdq,cqo). - Lifts multi-precision
adc/sbbacross8/16/32/64-bit operands with width-awareFlags::Add/Flags::Subcarry/borrow propagation, pre-mutationcf_<ip>/lhs_<ip>/rhs_<ip>snapshotting across flag lifetimes, andCFpreservation acrossinc/dec/not/bswap(#26, #27).
- Lifts x86_64 1-operand widening
- Complete & Balanced Pseudo-C Slicing (
xref slice):- Retains reaching definitions across loop back-edges and conditional branches, emits inline typed variable declarations (
let-><type> <var> = ...;) when hoisted block declarations are pruned, preservesskip_<hex>flag declarations and writes when referenced by retained structured guards, pins exact instruction-IP--to <hex_ip>statements via/* @xref_slice_target */, and guarantees balanced{/}braces across nested pruned structures (#26, #27).
- Retains reaching definitions across loop back-edges and conditional branches, emits inline typed variable declarations (
- Bounded
.rodataPreviews & Intra-Instruction ABI Register Tracking:
v0.0.4
Highlights
- Readable Typed Pseudo-C (
xref c/xref slice/xref dump):- Synthesizes readable C function signatures (
ret_ty fn_<hex>(ty arg_0, ...)) with immutable parameter names (arg_0..arg_5) and function header docblocks summarizing caller counts, panic source locations, parameter offset/role evidence, and return usage. - Performs bidirectional dataflow type propagation across registers, stack slots, and SSA live-range webs (
void *,const void *,u8 *,const u8 *,u16 *,const u16 *,u32 *,const u32 *,u64 *,const u64 *,usize,i64,u64,i32,u32,u16,u8,unk64), including element-indexed SIB array syntax (((u64 *)base)[idx + k]). - Annotates direct, PLT, and stripped Rust runtime calls (
rust_panic_bounds_check,rust_slice_index_fail,rust_capacity_overflow,bcmp,memcpy, etc.) with inline context comments and resolved string/location arguments. - Preserves indirect call arguments read in predecessor guards, prevents memory load base/index pointer leakage across integer
Add/Sub, avoids double-scaling typed pointer SIB displacements, and retains normal return blocks inxref slicebefore coldnoreturnpanic targets.
- Synthesizes readable C function signatures (
- Zero-
gotoStructured Control Flow:- Recognizes stripped Rust cold
noreturnpanic helpers and inlines coldnoreturnblocks directly into their guardingif (...) { ... }branches. - Structures multi-level forward jumps, rotated loop epilogue/early-return guards, and detached cold continuation blocks via equivalence-preserving region structuring and scoped skip flags (
u8 skip_<hex> = 0;, normalized as@skip_Ninxref diff-c).
- Recognizes stripped Rust cold
- Self-Hosted Dark Workbench (
docs/):- Locked dark static workbench (
docs/index.html,docs/recorded-data.js) with 114 verbatim CLI runs across 32 scenarios and 7 stripped self-hosted functions (0gotostatements across all 7 workbench functions).
- Locked dark static workbench (
v0.0.3
Highlights
- Backward Program Slicing (
xref slice <ADDR> --to <TARGET> [--fields]): Extracts a compact backward slice of reaching variable definitions, enclosing control-flow conditions, and early-exit precondition guards leading to a target call, field, or instruction address. - Cross-Build Pseudo-C Diff (
xref diff-c --other <OTHER_BIN> <ADDR...> [--fields]): Matches stripped functions across builds viaxref matchinvariants, normalizes volatilefn_<hex>andL_<hex>addresses to stable positional identifiers (@fn_N,@L_N), and emits a unified diff of pure logic changes. - Struct &
Vec<T>Field Sugar (xref c --fields&Typed C (->)Web Tab): Lifts raw*(T *)(reg + 0x...)pointer arithmetic into readablereg->f_<off>,®->sub_<off>, andreg->vec_<off>.{ptr,len,cap}expressions inferred byxref layout. - Parallel Modular Source-Tree Dump (
xref dump --out <DIR> [--src <PATTERN>] [--fields]): Decompiles functions in parallel across CPU cores into a structured module directory tree (<crate>/src/.../*.c) reconstructed from embedded source-path strings.
v0.0.2
What's New in v0.0.2
- Signed arithmetic overflow disambiguation (
c): distinguishesadd_overflow,sub_overflow(includingcmp+jo/jno),mul_overflow, andneg_overflowwith explicit(i64)casts (#17, #18). - Explicit range-slice markers (
c --from / --to): emits/* ... slice from 0x... */and/* ... truncated at 0x... (function ends at 0x...) ... */so partial slices are never mistaken for complete function bodies (#17, #18). - Callee parameter provenance & active-register discovery (
layout): annotates exact target parameter registers forleafield pointers (-> callee(reg)), direct loaded field values (val-> callee(reg)), 1-hop callee field accesses (via callee(reg)), forwarded-base summary, and alternate struct pointer parameter hints (other pointer args: rsi (N fields)) (#17, #18). - Single-pass web workbench highlighting: fixes HTML token highlighting edge cases and prioritizes source-mapped crate functions in
xref web(#16).
v0.0.1
First tagged release of xref (v0.0.1) — fast cross-references, struct layout reconstruction, and structured pseudo-C decompilation of x86-64 ELF binaries.
Highlights
- Structured Pseudo-C Decompiler (
xref c/decomp):O(B log B)control-flow structuring (if/else, multi-blockwhile&do/whileloops withbreak;/continue;, jump-tableswitch/case).- Interprocedural System V AMD64 live parameter recovery, caller stack arguments (
arg7..),(rax, rdx)tuple returns, and indirect register-saved import calls. - Automatic stripped Rust runtime helper recognition (
rust_unwrap_failed,rust_panic_bounds_check,rust_panic_fmt,rust_once_call,rust_alloc,rust_dealloc, etc.) and exact byte-length slicing of non-NUL&str&core::fmt::Argumentsstrings. - Expression simplification (
lealinear combinations,saturating_add,fs:/gs:TLS).
- Struct Layout Reconstruction (
xref layout):- Recovers field offsets, byte widths, read/write/
leacounts, array element strides, and 1-hop sub-struct callees (--reg,--callees).
- Recovers field offsets, byte widths, read/write/
- Address-of Field Tracking (
xref disp --lea):- Reports
lea reg, [base+disp]field borrows alongside loads/stores and annotates the receiving callee (; -> <callee>).
- Reports
- Interactive In-Memory Web Workbench (
xref web&docs/):- Zero-dependency local HTTP workbench (
xref -b BIN web --addr 127.0.0.1:7700) serving interactive Pseudo-C, Struct Layout, Annotated ASM, Callers/Callees, and whole-binary search.
- Zero-dependency local HTTP workbench (
Release history from GitHub as of 2026-11-02.
