generational-arena-dom

Crates.iogenerational-arena-dom
lib.rsgenerational-arena-dom
version0.1.0
sourcesrc
created_at2023-07-09 01:15:43.970303
updated_at2023-07-09 01:15:43.970303
descriptionA DOM implementation for html5ever that uses generational-arenas.
homepage
repositoryhttps://github.com/ethanhs/generational-arena-dom
max_upload_size
id911770
size14,936
Ethan Smith (ethanhs)

documentation

README

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.

Commit count: 2

cargo fmt