thorin

DWARF packaging utility, written in Rust, supporting GNU extension and DWARF 5 package formats.

OTHER License

Downloads
1.4M
Stars
41
Committers
8

thorin

thorin is an DWARF packaging utility for creating DWARF packages (*.dwp files) out of input DWARF objects (*.dwo files; or *.o files with .dwo sections), supporting both the pre-standard GNU extension format for DWARF packages and the standardized format introduced in DWARF 5.

thorin was written as part of the implementation of Split DWARF in rustc. A Rust implementation of a DWARF packaging utility is easier to integrate into the compiler and can support features like loading dwarf objects from archive files (or rustc's rlibs) which are helpful in supporting cross-crate Split DWARF packaging in rustc.

See the README documents of the thorin crate and the thorin-bin crate for usage details of the library and binary interfaces respectively.

Contributing to thorin

If you want help or mentorship, reach out to us in a GitHub issue, or ask davidtwco or in #t-compiler on the Rust Zulip instance.

thorin should always build on stable rustc. To build thorin:

$ cargo build

To run the tests, first install the relevant dependencies:

$ apt install --no-install-recommends --yes llvm-15 llvm-15-tools
$ pip install lit

Next, run the lit testsuite (replacing /path/to/llvm/bin with the correct path to your LLVM installation, if required):

$ cargo build # in debug mode..
$ lit -v --path "$PWD/target/debug/:/path/to/llvm/bin/" ./tests
$ cargo build --release # ..or in release mode
$ lit -v --path "$PWD/target/release/:/path/to/llvm/bin/" ./tests

We use rustfmt to automatically format and style all of our code. To install and use rustfmt:

$ rustup component add rustfmt
$ cargo fmt

Filing an issue

Think you've found a bug? File an issue! To help us understand and reproduce the issue, provide us with:

  • The (preferably minimal) test case
  • Steps to reproduce the issue using the test case
  • The expected result of following those steps
  • The actual result of following those steps

Definitely file an issue if you see an unexpected panic originating from within thorin! thorin should never panic unless it is explicitly documented to panic in the specific circumstances provided.

Name

Author and acknowledgements

License

Code of conduct