Skip to content

Conversation

@r3dlight
Copy link
Contributor

@r3dlight r3dlight commented Jan 7, 2026

Summary of changes

Typestate & API design

  • Keep the Mapped / Unmapped typestate model, but make it strict and meaningful
  • Remove redundant runtime state (mapped_to, Option)
  • Prevent invalid operations (e.g. mapping/unmapping in the wrong state)
  • Code cleanup under clippy --pedantic
  • Remove duplicated code between Mapped and Unmapped implementations
  • Centralize common logic in a single generic impl
  • Simplify the public API

Information handling

  • Replace Option with an explicit cache + validity flag
  • Avoid repeated syscalls when information is already available
  • Ensure cache invalidation after operations that change permissions or mapping state

Documentation

  • Document invariants, typestate transitions, and safety guarantees
  • Reduce redundant error lists while keeping behavior explicit

@r3dlight r3dlight added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 7, 2026
@r3dlight r3dlight requested review from PThierry and fvalette January 7, 2026 14:06
Copy link
Contributor

@PThierry PThierry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack for me, remember to generate a release (tag+release) once merged. I'm not fan of toml vs git tag duplication as it can generate divergences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants