daniel5151 / gdbstub

An ergonomic, featureful, and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust (with no-compromises #![no_std] support)
Other
295 stars 48 forks source link

Supports core::error::Error for Rust 1.81+ as a bound on gdbstub::target::Target::Error #153

Open ultimaweapon opened 2 weeks ago

ultimaweapon commented 2 weeks ago

My application rely on core::error::Error::source to propagate the errors from the lower-level to the top-level. It would be great if gdbstub provide a support this!

daniel5151 commented 2 weeks ago

Ahh, that's right - Error is finally in core! How exciting!

I would be happy to accept a PR that switches gdbstub's error types over to using the Error type in core instead of std.

One caveat: I would prefer landing this behind a new off-by-default core_error feature, so as to ensure that all current users of gdbstub 0.7.x are able to update to new revisions of gdbstub without running into MSRV issues. Later, when it comes time to cut a gdbstub 0.8 release, I'll remove the feature, and require a MSRV of >1.81.

ultimaweapon commented 2 weeks ago

Noted. I'll create a PR once ready.