das-labor / panopticon

A libre cross-platform disassembler.
https://panopticon.re
GNU General Public License v3.0
1.43k stars 80 forks source link

Switch to serde #237

Closed sphinxc0re closed 7 years ago

m4b commented 7 years ago

I think this is a good idea, I already had a working version with this somewhere, should be pretty simple. Also since I forced 1.15 rust :laughing: should be easy. I don't think this is really tedious, in principle should just be adding to toml file, changing from RustcSerialize to Serialize and adding the correct extern crate.

m4b commented 7 years ago

I just tried doing this and i take it back it will be very tedious; I think it'll require rust graph algos to also use serde, which is another PR over there. This might be a reason not to switch to petgraph #238, as it doesn't seem to implement serde, which makes serializing the project to disk harder iiuc

m4b commented 7 years ago

Here is a branch taking a stab at this; i probably won't work on it anymore right now, but its a good start i think

https://github.com/m4b/panopticon/tree/serde

flanfly commented 7 years ago

As always, amazing work @m4b! What I expect from a move to Serde is a stable, defined on-disk format. Currently we simply dump all the internal structures onto disk, so changing a single field causes the format to become incompatible with the previous version. This has to change before I consider Panopticon to be 1.0. I guess we need to think about what we actually need to save on disk and serialize exactly that using some kind of proxy structures.

Anyway, I talked to one of ethcore guys at last years RustFest and they seem to use Serde too and are happy with it.

flanfly commented 7 years ago

Fixed by #288. Thanks everybody.