Skip to content

Releases: Techcable/nounwind.rs

Add #[track_caller] to panic_nounwind_fmt

13 Jan 06:50
cb18f9f

Choose a tag to compare

Before this, the panic internals were missing this attribute.
This means the location information was never actually being propagated.

Optimize nounwind_panic! with constant message

09 Jan 06:45
6067825

Choose a tag to compare

This release optimizes nounwind_panic! and friends to avoid formatting overhead when the message is constant. So nounwind_panic!("message") does not construct a core::fmt::Arguments. This reduces code-size in the caller.

Adds doctests and a basic integration test. It's difficult to test the panic/abort case due to aborting the test process.

Move panic internals to a separate module to make it less likely to invoke accidentally.

Add assert_nounwind! macro

06 Jan 02:47
0c3ab1c

Choose a tag to compare

The assert_nounwind! and unreachable_nounwind macros are new convenience wrappers around panic_nounwind!. I don't intend to add the other panic macros, as they are much less useful.

Add #[track_caller] to the nounwind::panic_nounwind() function. This has a minor increase in code size in the caller, but this can be avoided in the way described in the docs.

Add panic_nounwind! macro

19 Dec 02:23
0a3fb3a

Choose a tag to compare

The panic_nounwind! error message provides superior error messages to nounwind::abort_unwind(|| panic!()). The latter prints two panic messages and a confusing backtrace.

These improved error messages require the std feature to be enabled. In the next version of nounwind (v0.2.0), the std feature will be enabled by default.

Change the libabort feature to be an optional dependency enabled by the old-rust-nostd feature (on by default). If the std feature is enabled, old versions of Rust can still be supported without needing old-rust-nostd.

No changes to nounwind-macros since v0.1.1. This version was mistakenly released as nounwind v0.1.1. I later yanked it when I realized I already released nounwind-macros v0.1.1.

Use syn-mid crate for macros instead of syn/full

30 Sep 14:19
9c1d58d

Choose a tag to compare

The nounwind-macros crate does not need to parse the body of the function, so we can use the taiki-e/syn-mid crate instead of syn/full. This should reduce compile times (at least as long as no other crate requires syn/full).

Initial release

11 Sep 18:50
d177d1d

Choose a tag to compare

Passes basic tests. It should be useful!