Skip to content

[Feature]: WASM save/load support #14

Description

@spaceoddity-carlos

Is your feature request related to a problem? Please describe.

Currently if you try to use the library on WASM it will fail because because direct file operations are not supported by the platform.

From the documentation it seems like the goal is to support WASM and no std environments so I believe this request is in scope and a placeholder/temporary implementation should be relatively easy to implement.

Describe the solution you'd like

Adding a WASM feature flag that replaces normal file access with window.localStorage or something like indexedDb.

From a quick look through the code it looks like changes would be limited to a small number of functions.

Describe alternatives you've considered

Besides some inelegant workarounds using write_to_writer I don't see a clean way around adding the feature flag and changing the storage solution for WASM.

Can you help us implement this feature?

  • I am willing to submit a Pull Request to implement this feature.
  • I am not able to, but I can help with testing and providing feedback.
  • I'm just throwing an idea out there!

Additional context

My current usage of the library is an attempt at integration with bevy and I'm using WASM as my target for testing.

Metadata

Metadata

Assignees

Labels

AcceptedThis issue has been accepted.enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions