#weak-references #reference-counting #arc #servo #data #sync #fork

servo_arc

A fork of std::sync::Arc with some extra functionality and without weak references

5 releases (3 breaking)

0.4.0 Oct 22, 2024
0.3.0 Jun 21, 2023
0.2.0 Feb 20, 2023
0.1.1 Feb 22, 2018
0.1.0 Jan 12, 2018

#165 in Rust patterns

Download history 128471/week @ 2024-09-21 136037/week @ 2024-09-28 135857/week @ 2024-10-05 136674/week @ 2024-10-12 146745/week @ 2024-10-19 141522/week @ 2024-10-26 154260/week @ 2024-11-02 147820/week @ 2024-11-09 150979/week @ 2024-11-16 128441/week @ 2024-11-23 155622/week @ 2024-11-30 155271/week @ 2024-12-07 159078/week @ 2024-12-14 81546/week @ 2024-12-21 98293/week @ 2024-12-28 163788/week @ 2025-01-04

526,861 downloads per month
Used in 1,093 crates (4 directly)

MIT/Apache

42KB
759 lines

Fork of Arc for Servo. This has the following advantages over std::sync::Arc:

  • We don't waste storage on the weak reference count.
  • We don't do extra RMU operations to handle the possibility of weak references.
  • We can experiment with arena allocation (todo).
  • We can add methods to support our custom use cases 1.
  • We have support for dynamically-sized types (see from_header_and_iter).
  • We have support for thin arcs to unsized types (see ThinArc).
  • We have support for references to static data, which don't do any refcounting.

Dependencies

~160KB