An implementation of the Rope data structure for storing large text documents. This implementation is a component of the an-editor
project.
A rope is an efficient data structure for large mutable strings. It's essentially a binary tree whose leaves are strings.
For more information, see the following resources:
Our Rope
implementation aims to eventually function as a superset of
Rust's String
,
providing the same API plus additional methods. Therefore, code which uses
String
can easily be ported to use Rope
.
Rope
provides two APIs for editing a Rope
: a destructive,
edit-in-place API whose methods match those of String
, and a
non-destructive, persistent API.
an-rope
is built against the latest stable, beta, and nightly Rust releases, on macOS and Ubuntu. Some features rely on nightly Rust, and may not be available on other release channels.
tendril
: use the tendril
library to optimise performance for small strings.rebalance
: enable Rope rebalancing.unstable
: enable nightly Rust features. pass this flag if building on nightly Rust.