#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

#171 in Rust patterns

Download history 121954/week @ 2024-08-23 122387/week @ 2024-08-30 122319/week @ 2024-09-06 122818/week @ 2024-09-13 129521/week @ 2024-09-20 133210/week @ 2024-09-27 136046/week @ 2024-10-04 133812/week @ 2024-10-11 148897/week @ 2024-10-18 142848/week @ 2024-10-25 148775/week @ 2024-11-01 148099/week @ 2024-11-08 156274/week @ 2024-11-15 133389/week @ 2024-11-22 148902/week @ 2024-11-29 130268/week @ 2024-12-06

594,825 downloads per month
Used in 1,052 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

~170KB