ER-Save-Editor icon indicating copy to clipboard operation
ER-Save-Editor copied to clipboard

Export save parsing as Rust library (wasm compatibility)

Open EthanShoeDev opened this issue 1 year ago • 2 comments

I wanted to use a lot of the code in this package on a website so that users can read info from their saves.

I was able to copy all the modules (except ui) from this repo into a wasm-pack template and eventually after adding some

use serde::Serialize;
#[derive(Clone, Serialize)]

I was able to get it to work.

While this does work, it would be beneficial for this project to be broken into 2 packages:

  • rust save parser lib that can compile to wasm
  • the ui.

That way everyone can benefit from future updates.

I'd happily make a PR if @ClayAmore is okay with this approach.

EthanShoeDev avatar Jun 20 '24 23:06 EthanShoeDev

Good idea! I've been considering splitting the tool into two separate projects: er-save-lib and er-save-editor. Regarding serialization, I'm leaning towards deku instead of serde.

If you're interested in trying your hand at writing your own parser, I've created templates using 010 Editor for the save file. You can find them here: EldenRingSaveTemplate.

ClayAmore avatar Jun 23 '24 19:06 ClayAmore

That's awesome, thanks! I will look more into deku.

Whenever DLC compatibility is merged and I have some time I'd love to try to convert my serde code into more correct deku usages and split the lib and UI code a bit more cleanly.

If I complete that work, I will be sure to publish it in a PR. Feel free to scrap it if its not useful for you :)

Thanks for making this awesome project, I can't think of a better way to practice rust.

EthanShoeDev avatar Jul 16 '24 17:07 EthanShoeDev