Unsoundness in owning_ref

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • owning-ref-rs

    A library for creating references that carry their owner with them.

  • I feel obligated to say again that I haven't fixed this issue, so my fork is still unsound because of StackedBorrows violations. And also, I haven't had any review, so maybe I also missed something. Granted, I mostly removed methods.

  • owning-ref-unsoundness

    An article explaining the unsoundness I found in owning-ref

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • advisory-db

    Security advisory database for Rust crates published through crates.io

  • This looks like it should be reported to https://github.com/rustsec/advisory-db

  • fluent.js

    JavaScript implementation of Project Fluent

  • As an example, there is a really good localisation framework called Project Fluent where you write your translatable expressions in a text file that later gets parsed. The resulting parse tree borrows entirely from the original text and doesn't make any allocations other than the occasional Vec for sequences.

  • string

    Rust String type with configurable byte storage. (by carllerche)

  • If they do need to be string slices, you could wrap bytes::Bytes inside String from the string crate. Parsing generally results in a bunch of &strs borrowed from the String, and you'll want the slice_ref method added by this PR to turn the slices back into unborrowed String instances efficiently (no copying or UTF-8 checking, just incrementing an atomic reference counter).

  • once_self_cell

    Safe-to-use proc-macro-free self-referential structs in stable Rust.

  • 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.

  • tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • escher

    Self-referencial structs using the async/await transformation (by petrosagg)

  • I'm the author of escher. In the initial implementation I had a soundness hole discovered by dtolnay https://github.com/petrosagg/escher/issues/1 which I "fixed" by disabling the corresponding function.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts