This is largely the same as #305, but updated for the current tree.
This is the wasmtime-debug crate, which provides functionality to read, transform, and write DWARF section.
wasmtime-debug