What is Box and how is it different from String in Rust?

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

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

    Compiler for the Vale programming language - http://vale.dev/ (by ValeLang)

    This is actually what we're doing in Vale. [0]

    Rust is a stellar language, and there's a lot we as a field can learn from it. Its borrow checker is pretty amazing for optimization, but it can be a detriment for a program's overall architecture, not to mention the difficult learning curve, which people tend to underestimate as an issue.

    I want Rust to grow and succeed in the realms it's uniquely suited for, but I think we can make a general purpose programming language that combines its features in a new way and brings its strengths to the rest of the programming world.

    For example, we found a way to recreate the borrow checker based on regions [1] on top of a foundation of shared mutability with reference counting (or generational references [2] in Vale's case).

    Another example is inspired by Rust's RefCell; we found a way to decouple it from Rust's usual aliasability-xor-mutability rules to make it more flexible, in something we call Hybrid-Generational Memory. [3]

    If we succeed, then we'll have found a way to get the borrow checker's benefits without its complexity. We're a little over halfway done with implementing the region borrow checker [4] and haven't broken ground on HGM yet, but we're well on our way.

    Hopefully Vale will be the smaller, clearer language that's struggling to come out of Rust!

    [0] https://vale.dev/

    [1] https://verdagon.dev/blog/zero-cost-refs-regions

    [2] https://verdagon.dev/blog/generational-references

    [3] https://verdagon.dev/blog/hybrid-generational-memory

    [4] https://github.com/ValeLang/Vale/tree/master/Backend/src/reg...

  • rfcs

    RFCs for changes to Rust

    Note that this is a very old RFC and doesn't have much context and discussion compared to later RFCs. It is worthwhile to read the actual discussion happened [1].

    [1] https://github.com/rust-lang/rfcs/pull/60

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

  • compact_str

    A memory efficient string type that can store up to 24* bytes on the stack

  • rust

    Empowering everyone to build reliable and efficient software.

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