rustc -Zls /path/to/file
(rustc -Zls=full /path/to/file
for newer nightly, I extended it in https://github.com/rust-lang/rust/pull/115735) can dump some information from the crate metadata of a .rmeta
, .rlib
or rust .so
. Make sure to use the same rustc as the one that originally compiled it. Most information in the crate metadata can't be dumped using rustc -Zls
though and there is no external tool which works with current rustc versions.