Skip to content

Feat/feature wasm saveload support #14#18

Merged
Retype15 merged 4 commits into
mainfrom
feat/feature-wasm-saveload-support-#14
Dec 30, 2025
Merged

Feat/feature wasm saveload support #14#18
Retype15 merged 4 commits into
mainfrom
feat/feature-wasm-saveload-support-#14

Conversation

@Retype15

@Retype15 Retype15 commented Dec 30, 2025

Copy link
Copy Markdown
Member

📝 Summary of Changes

  • Parcode::save -> Only accepts a Path to save directly to storage (Not compatible with WASM)
  • Parcode::write -> Performs the function of .write_to_writer(...), serializes and saves to the given buffer
  • ParcodeOption.write_to_writer -> Now called ParcodeOption.write
  • Parcode::inspect -> Equivalent to ParcodeInspector::inspect
  • Parcode::inspect_bytes -> Accepts Vec Buffers directly
  • Parcode::open_bytes -> As Parcode::open but accepts manual data buffer directly.
  • Parcode::save_sync -> Saves data using single-threaded algorythm. (Not compatible with WASM)
  • Parcode::write_sync -> Saves data into a manual buffer.
  • Parcode::serialize -> Serialize all data in a new buffer and return it.
  • Parcode::load -> Updated to set as no compatible with WASM
  • Parcode::load_bytes -> This method accepts a manual buffer to loads
  • Parcode::open_bytes -> Open data using a buffer (byte slice)
  • Added new features: ["mmap", "parallel"]
    • mmap -> habilite mmap to access files instantly
    • parallel -> Habilite rayon to all parallel uses cases

🔗 Related Issue


✅ Checklist

  • Self-review: I have performed a thorough self-review of my code.
  • Code Style: My code follows the project's style guidelines (cargo fmt).
  • [Linter: I have run cargo clippy --all-targets --all-features -- -D warnings and addressed all issues.
  • Tests:
    • I have added new tests that prove my fix is effective or that my feature works.
    • All existing and new tests pass locally with my changes (cargo test).
  • Documentation:
    • I have added or updated the necessary documentation (README.md, code comments, etc.).
    • My changes are reflected in the user-facing documentation if applicable.
  • Conventional Commits: My commit messages follow the Conventional Commits specification.
  • No New Warnings: My changes do not introduce any new compiler warnings.
  • Breaking Changes:
    • This Pull Request does not introduce any breaking changes.
    • This Pull Request does introduce breaking changes. (Please describe the impact below).

💥 Breaking Changes

The structure and API signature have been changed:

  • Parcode::save -> Only accepts a Path to save directly to storage (Not compatible with WASM)
  • Parcode::write -> Performs the function of .write_to_writer(...), serializes and saves to the given buffer
  • ParcodeOption.write_to_writer -> Now called ParcodeOption.write
  • Now, rayon and mmap2 is optional features, using respectives features.

- **async:** Implement rayon and make loading and saving multithreaded.
- **mmap:** Includes mmap and uses it in open as in <=v0.5.3: `unsafe { Mmap::map(&file)? };`.
- **common:** Enables the two previous features as one.

Added alternative methods to use a buffer directly.
- **async:** Implement rayon and make loading and saving multithreaded.
- **mmap:** Includes mmap and uses it in open as in <=v0.5.3: `unsafe { Mmap::map(&file)? };`.
- **common:** Enables the two previous features as one.

Added alternative methods to use a buffer directly (write, write_sync).

- Changed: writer_to_write -> write
@Retype15 Retype15 self-assigned this Dec 30, 2025
@Retype15 Retype15 added enhancement New feature or request Accepted This issue has been accepted. labels Dec 30, 2025
@Retype15 Retype15 linked an issue Dec 30, 2025 that may be closed by this pull request
3 tasks
- **async:** Implement rayon and make loading and saving multithreaded.
- **mmap:** Includes mmap and uses it in open as in <=v0.5.3: `unsafe { Mmap::map(&file)? };`.
- **common:** Enables the two previous features as one.

Added alternative methods to use a buffer directly (write, write_sync).

- Changed: writer_to_write -> write
- Update a majority of documentation to use this new API.
- **async:** Implement rayon and make loading and saving multithreaded.
- **mmap:** Includes mmap and uses it in open as in <=v0.5.3: `unsafe { Mmap::map(&file)? };`.
- **common:** Enables the two previous features as one.

Added alternative methods to use a buffer directly (write, write_sync).

- Changed: writer_to_write -> write
- Update a majority of documentation to use this new API.

Update axes task runner configuration, refine gitignore, and introduce comprehensive API integration tests.
@Retype15 Retype15 merged commit 11b7221 into main Dec 30, 2025
4 checks passed
@Retype15 Retype15 deleted the feat/feature-wasm-saveload-support-#14 branch December 30, 2025 22:59
@Retype15 Retype15 restored the feat/feature-wasm-saveload-support-#14 branch December 30, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted This issue has been accepted. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: WASM save/load support

1 participant