QCell 0.5.0 release, with `no_std` support

qcell is a crate that implements GhostCell (as LCell) and 3 other related types with various different characteristics that are useful in different scenarios. It is the foundation of the safety guarantees of the stakker crate.

Release 0.5.0:

Thanks to contributions from GitHub user geeklint, QCell crate now has support for no_std in QCell and LCell.

Other changes of interest since the last announced release:

  • ID-based cells (QCell) now derive their ID from the address of an owned piece of memory, i.e. an object on the stack or heap. This offloads management of IDs to the allocator or stack.

  • An unsoundness issue in TCell and TLCell was discovered and fixed by GitHub user steffahn. This is due to Rust TypeId taking into account the lifetime, i.e. you get a different type-id for the same type with different lifetimes, and Rust will automatically cast between them. The solution is to force invariance with some type voodoo. This is a weird corner of Rust I'd never understood before. Ideally std::any::TypeId docs should be improved. (This bug does not affect the safety of correct use of the crate, but fixing it blocks a malicious coder from getting potential unsoundness through a code review.)

As ever, if anyone can see any soundness issues with the current implementation, please raise an issue. The steady increased bulletproofing of this crate is all down to community review, so thanks for that. So really, please try to break it if that kind of thing interests you.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.