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

Immutable Core #23

Closed
expede opened this issue May 31, 2022 · 1 comment
Closed

Immutable Core #23

expede opened this issue May 31, 2022 · 1 comment
Assignees

Comments

@expede
Copy link
Member

expede commented May 31, 2022

Port of oddsdk/ts-odd#301


Make the internals run on an immutable core

  • Easier to reason about
  • Required for fork/merge CRDT reconciliation

Linking

@matheus23
Copy link
Member

matheus23 commented May 31, 2022

This is done! :)

All operations are defined on Rc<PublicDirectory> (i.e. owned reference counted smart pointers on immutable data) and the data itself doesn't contain any RefCells:

https://github.com/WebNativeFileSystem/rs-wnfs/blob/4170b8e86058a02ca3a8a713b53b842d2b08afc5/crates/fs/public/directory.rs#L41-L46

https://github.com/WebNativeFileSystem/rs-wnfs/blob/4170b8e86058a02ca3a8a713b53b842d2b08afc5/crates/fs/public/link.rs#L14-L18

https://github.com/WebNativeFileSystem/rs-wnfs/blob/4170b8e86058a02ca3a8a713b53b842d2b08afc5/crates/fs/public/node.rs#L17-L21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants