once_self_cell

Safe-to-use proc-macro-free self-referential structs in stable Rust. (by Voultapher)

Once_self_cell Alternatives

Similar projects and alternatives to once_self_cell

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better once_self_cell alternative or higher similarity.

once_self_cell reviews and mentions

Posts with mentions or reviews of once_self_cell. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-11.
  • Ouroboros is also unsound
    3 projects | /r/rust | 11 Jun 2023
    This issue says "Migrate code to use self_cell instead." That page says "It has undergone community code review from experienced Rust users." Looking at the review, issues were found and fixed earlier on, but my interpretation of the end of the thread is more that folks stopped responding with concerns, so confidence is now assumed but still not proven. The same was true of most (all?) other crates trying to solve the same problem, until enough people did find the unsoundness holes unique to each crate.
  • Announcing self_cell version 1.0
    2 projects | /r/rust | 29 May 2023
    I've come across the zip example bevor, and even considered adding support for mutable access to the owner here https://github.com/Voultapher/self_cell/pull/36. See the last comment why I decided not to pursue this. Looking at the specific example, really what is the purpose of storing the lazy ZipReader result? IMO that's bit of bad design on the part of the zip crate. The stdlib APIs consume reader, allowing you to abstract over creation logic. If what you need to store, needs further pre-processing, why not pull that out? Specifically here, what is the point of having a self-referential struct that contains an owner ZipArchive that you will no longer be allowed to mutate. And a lazy reader ZipReader that you can then use to really read the file? If you need to abstract over the construction logic you could return (ZipArchive, Box ZipReader>), if you want to return the content you can return (ZipArchive, Vec) allowing further use of ZipArchive.
  • Unsoundness in owning_ref
    10 projects | /r/rust | 26 Jan 2022
    As the author of self_cell I can attest, that writing unsafe lifetime abstractions is exceedingly tricky and you will get it wrong, repeatedly. I'm not sure these problems in owning_ref can be solved without a serious overhaul of the API. For one it tracks too little information, both ouroboros and self_cell independently reached the conclusion that you have to mark the dependent as either covariant or not_covariant over the owner lifetime, and prohibit ever leaking direct references if the dependent is not_covariant. But the fun doesn't stop there, if the owner can have a lifetime too, things get extra tricky. If you want to dive deeper take a look at this discussion https://github.com/Voultapher/self_cell/pull/29.
  • My experience crafting an interpreter with Rust
    2 projects | /r/rust | 22 Jul 2021
    Grouping the source and derived AST in the same struct without leaking the lifetime is something that greatly helped keep the API sane. Shameless plug https://github.com/Voultapher/self_cell
  • Safe-to-use proc-macro-free self-referential structs in stable Rust.
    4 projects | /r/rust | 13 Mar 2021
    Thanks, I'll incorporate that into https://github.com/Voultapher/once_self_cell/issues/5
  • A note from our sponsor - WorkOS
    workos.com | 24 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic once_self_cell repo stats
9
226
7.3
4 months ago

Voultapher/once_self_cell is an open source project licensed under Apache License 2.0 which is an OSI approved license.

The primary programming language of once_self_cell is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com