huonw / primal

primal puts raw power into prime numbers.
http://docs.rs/primal/
Apache License 2.0
108 stars 17 forks source link

Allow serializing/deserializing `Primes` #33

Open chrismooredev opened 3 years ago

chrismooredev commented 3 years ago

I'm working on a solver/number generator for OEIS A111441 and in the process, I'd like to be able to start/stop the program, as I intend to run it for multiple days and would not like to have to restart from zero if I have to stop the program for whatever reason.

I tried to follow a guide to implement serde for remote types, but there were just too many nested private types that it didn't end up as feasible for me, so I figured I'd ask.

cuviper commented 3 years ago

I think that might be okay, but I wouldn't want the serialized format to lock us into the current internal data structures entirely. That is, it should be somewhat abstracted from the actual in-memory representation so we're free to change.