Rust: Box Is a Unique Type

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rust-playground

    The Rust Playground

  • > The biggest annoying magic I found with respect to Box (and other std containers like Rc) is that they’re the only ones capable of storing fat dyn pointers. You can’t construct a hybrid_rc::Rc like you can with Box/Rc.

    Anything can store fat dyn pointers, they're just like any other type in that regards.

    Constructing them for a specific trait is easy and possible on stable (e.g. adding a `as_debug(MyBox) -> MyBox` method).

    Making it possible to construct them for any trait is special to the built in pointers... on stable. On nightly with unstable features it's possible (and easy) to make any smart pointer type do this.

    Code examples:

    https://play.rust-lang.org/?version=nightly&mode=debug&editi...

  • miri

    An interpreter for Rust's mid-level intermediate representation

  • >While we are many missing language features away from this being the case, the noalias case is also magic descended upon box itself, with no user code ever having access to it.

    I'm not sure why the author thinks there's magic behind Box. Box is not a special case of `noalias`. Run this snippet with miri and you'll see the same issue: https://play.rust-lang.org/?version=stable&mode=debug&editio...

    `Box` _does_ have an expectation that its inner pointer is not aliased to another Box (even if used for readonly operations). See: https://github.com/rust-lang/miri/issues/1800#issuecomment-8...)

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

    RFCs for changes to Rust (by Darksonn)

  • Improving this is the subject of RFC #3621 [1], which appeared today.

    [1]: https://github.com/Darksonn/rfcs/blob/derive-smart-pointer/t...

  • deno_core

    The core engine at the heart of Deno

  • I forgot about this. I actually had to ignore a test in Miri because of this exact issue.

    https://github.com/denoland/deno_core/blob/98b09fa4f77db1131...

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