Backtrace with no_std

I would like to create one configuration for very small binaries and no_std, for release builds. And another with inclusion of std for debug builds, along with backtraces and debugging goodness. Unfortunately, including a panic! in no_std build drags in 400KB.

Can I disable no_std for debug yet include it for release? In release I will just abort on panic. Stumbling blocks appear to be: no_std demands eh_personality and panic_fmt be included in no_std. Also rust gets confused over which libraries are in std and which in core. The debug version looks in std for functions that are also defined in core. I am not sure of the best way to proceed.

Regards,
Steve