diff options
| author | Sean Cross <sean@xobs.io> | 2023-11-05 21:33:43 +0800 |
|---|---|---|
| committer | Sean Cross <sean@xobs.io> | 2023-11-16 15:23:09 +0800 |
| commit | ee870d6c8262cf58e203cc144e228a42072abb79 (patch) | |
| tree | 68a08303d812660e880f58dccd7f88976261896c /library/unwind/src/lib.rs | |
| parent | 57fb1e643aa96da3c7024ff5a45859647f39ad5b (diff) | |
| download | rust-ee870d6c8262cf58e203cc144e228a42072abb79.tar.gz rust-ee870d6c8262cf58e203cc144e228a42072abb79.zip | |
unwind: add support for using `unwinding` crate
The `unwinding` crate supports processing unwinding data, and is written entirely in Rust. This allows it to be ported to new platforms more easily than using the llvm-based `libunwind`. While `libunwind` is very well supported on major targets, it is difficult to use on other targets. SGX is an example of this where Rust carries custom patches in order to enable backtrace support. This adds an alternative for supported architectures. Rather than providing a custom target, `unwinding` allows for a solution that is completely written in Rust. This adds `xous` as the first consumer, and forthcoming patches will modify libstd to take advantage of this. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'library/unwind/src/lib.rs')
| -rw-r--r-- | library/unwind/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs index 335bded71c1..eeee98f754e 100644 --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs @@ -26,6 +26,9 @@ cfg_if::cfg_if! { ))] { mod libunwind; pub use libunwind::*; + } else if #[cfg(target_os = "xous")] { + mod unwinding; + pub use unwinding::*; } else { // no unwinder on the system! // - wasm32 (not emscripten, which is "unix" family) |
