gimli-rs / gimli

A library for reading and writing the DWARF debugging format
https://docs.rs/gimli/
Apache License 2.0
831 stars 105 forks source link

Proof of concept: Allow recycling UnwindContext allocation #702

Closed mstange closed 5 months ago

mstange commented 6 months ago

I was trying to give the idea from #701 a try. This implementation works, but it uses GATs so it raises the MSRV to 1.65. It's also somewhat messy in a few places - I'm particularly unhappy with the Option<> in ArrayVec which I had to add because you can't destructure a type which implements Drop.

If addressing #701 requires Rust 1.65 anyway, and thus should be considered a breaking change, then there might be simpler options on the table. If we can eliminate or simplify the ArrayLike trait, it might open up simpler options.

philipc commented 6 months ago

Raising MSRV is fine. I'm all for anything that can simplify this. Reducing the amount of unsafe here would be great.

philipc commented 5 months ago

Closed by #703