Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export save parsing as Rust library (wasm compatibility) #34

Open
EthanShoeDev opened this issue Jun 20, 2024 · 2 comments
Open

Export save parsing as Rust library (wasm compatibility) #34

EthanShoeDev opened this issue Jun 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@EthanShoeDev
Copy link

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.

@ClayAmore
Copy link
Owner

ClayAmore commented Jun 23, 2024

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.

@EthanShoeDev
Copy link
Author

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.

@ClayAmore ClayAmore added the enhancement New feature or request label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants