Skip to content

Instantly share code, notes, and snippets.

@vbhavsar
Created August 18, 2024 18:39
Show Gist options
  • Save vbhavsar/49c2ea8d072041e8cc8e2a0d91e25f2e to your computer and use it in GitHub Desktop.
Save vbhavsar/49c2ea8d072041e8cc8e2a0d91e25f2e to your computer and use it in GitHub Desktop.
Rust backtrace to JSON
# Converts a backtrace line to JSON
sed -n '/Backtrace /p' $1 \
| grep -o '\[.*]' | \
sed -e 's/ file: / "file": /g' \
-e 's/ fn:/ "fn":/g' \
-e 's/ line:/ "line":/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment