1 unstable release
0.1.0 | Jul 9, 2023 |
---|
#12 in #html5ever
13KB
250 lines
Generational Arena DOM
This is an implementation of the DOM used in html5ever
using generational_indextree
, an implementation of indextree using generational arenas.
Using an indextree for the DOM makes mutation much simpler, as the docs for indextree state:
This arena tree structure is using just a single Vec and numerical identifiers (indices in the vector) instead of reference counted pointers like. This means there is no RefCell and mutability is handled in a way much more idiomatic to Rust through unique (&mut) access to the arena.
However, indextree suffers from the ABA problem, which we can solve via using generational-arenas instead of Vec
based arenas.
Dependencies
~1–5.5MB
~25K SLoC