News for hackers. Stuff that matters.
Re:Native Reflection in Rust by jeroenhd on Thursday December 15, 2022 @11:41AM (#34002123)
Does using DWARF info imply that this will break when you strip the resulting executable? I often strip my Rust binaries because it practically halves the application size, which can become quite a lot in a language where you're statically linking everything.

Regardless, quite an ingenious use of standard ELF features, I didn't think this would be possible in Rust without adding some kind of VM around reflection code.

Re:Native Reflection in Rust by jswrenn on Thursday December 15, 2022 @11:45AM (#34002189)
Yes, unfortunately that's a tradeoff here. Rust does support splitting debug info into other files, but Deflect doesn't support loading split debuginfo yet.
Re:Native Reflection in Rust by HideousKojima on Thursday December 15, 2022 @12:42PM (#34002994)
C# has similar issues where they have to be conservative about what them trim from binaries for AoT in case it is used for reflection, so I imagine you'd run into the same issues for almost any compiled language you want to implement reflection for.