PackageTrack
Sign in Get early access

ropey

A fast and robust text rope for Rust

1.6.1 11M downloads/mo #3023 most downloaded on crates.io cessen/ropey

What this package is like to depend on

Last release 1 years ago

02 Aug 2025

Release timing varies

gaps range from 4 weeks to 12 months

Most releases are documented

notes for 30 of 36 stable releases

3 versions withdrawn

withdrawn after publishing

11 years old

44 releases · first in 2015

0 releases in the last 12 months

see the full history below

Release timeline

44 releases · Feb 2015 to Aug 2025
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 44
  1. 2.0.0-beta.1 02 Aug 2025 pre-release

    Nothing published for this version

  2. 2.0.0-alpha.3 01 Jun 2025 pre-release

    Nothing published for this version

  3. 2.0.0-alpha.2 21 Oct 2024 pre-release
    Release notes

    Prep for 2.0.0-alpha.2 release.

    Open source →
  4. 2.0.0-alpha.1 20 Oct 2024 pre-release
    Release notes

    Update Cargo.toml in preparation for alpha release.

    Open source →
  5. 1.6.1 18 Oct 2023
    Release notes

    Prepare for release v1.6.1.

    Open source →
    Release notes
    • Fixed test code that was incorrect on some platforms / with some configurations.
    • Minor documentation improvements.
    Open source →
  6. 1.6.0 01 Feb 2023
    Release notes

    Prep for release v1.6.0.

    Open source →
    Release notes

    New features

    • Added is_instance() method, which checks if two ropes are same-memory instances of each other.

    Bug fixes

    • Ropey would panic when trying to create a Lines iterator for an empty rope or rope slice.
    Open source →
  7. 1.5.1 01 Jan 2023
    Release notes

    Prep for release v1.5.1.

    Open source →
    Release notes

    Performance

    • A much faster Lines iterator, thanks to @pascalkuthe (PR #70).

    Bug fixes

    • Ropey's Hash impl was incorrect, due to making incorrect assumptions about the guaranteed behavior of Hashers. This didn't cause any problems with Rust's default hasher, but was incorrect in the general case.
    • Comparing ropes for equality would panic when the two ropes had chunk boundaries that weren't mutually aligned at char boundaries.
    • len_lines() could give incorrect counts on RopeSlices that split CRLF pairs.
    • Ropey's internal B-Tree representation could (rarely) end up in a state that violated some invariants. This didn't affect anything in practice, because no code currently depends on the violated invariant. But future code might.
    Open source →
  8. 1.5.1-alpha 28 Nov 2022 pre-release
    Release notes
    • Special early release, mainly to accomodate the Helix project. It is not recommended to use this release outside of Helix.
    Open source →
  9. 1.5.0 29 May 2022
    Release notes

    Prep for release v1.5.0.

    Open source →
    Release notes

    New features

    • Added a reversed() method for Ropey's iterators. This is the same as reverse() except instead of mutating in-place, it consumes the iterator and returns it reversed. This is more convenient when chaining iterator method calls.
    • Added a simd cargo feature flag. It's enabled by default, but can be disabled to use only scalar code (no simd intrinsics).

    Bug fixes

    • Fix a theoretical memory safety issue found via running Ropey's tests through miri. Thanks to @Nilstrieb!
    • Fix (unintentionally) depending on Rust memory layout to achieve precise node sizes in memory. We now use repr(C).
    Open source →
  10. 1.4.1 17 Mar 2022
    Release notes

    Prep for release v1.4.1.

    Open source →
    Release notes

    Bug fixes

    • Fix a stupid copy/paste typo in the previous line break feature flag implementation that caused the wrong line break code to be used.
    Open source →
  11. 1.4.0 16 Mar 2022 withdrawn
    Release notes

    Prep for release v1.4.0.

    Open source →
    Release notes

    New features

    • Added byte_slice() and get_byte_slice() methods to Rope and RopeSlice to slice by byte index instead of char index. This can allow optimizations in client code in some cases.
    • Added cr_lines and unicode_lines feature flags to the crate, to manage what line endings are recognized and tracked. This allows, for example, building Ropey to only recognize line feed as a line break. unicode_lines is on by default, and corresponds to the original behavior.
    • Implemented std::hash::Hash for Rope and RopeSlice.

    Misc

    • Split str_utils module out into a separate crate, str_indices. The str_utils module still exists, but is now mostly just a re-export of the new crate.
    Open source →
  12. 1.3.2 30 Dec 2021
    Release notes

    Prepare for release v1.3.2.

    Open source →
    Release notes

    Bug fixes

    • Relax the lifetime requirements of various RopeSlice methods. They were unintentionally strict.
    Open source →
  13. 1.3.1 23 Jun 2021
    Release notes

    Prep for release v1.3.1.

    Open source →
    Release notes

    Bug fixes

    • Fix unnecessary rope fragmentation when using Rope::append() to append many small ropes together.
    • Fix contiguous RopeSlices occasionally failing to convert to a &str with RopeSlice::as_str().
    Open source →
  14. 1.3.0 16 Jun 2021
    Release notes

    New features

    • Added non-panicking versions of all methods on Rope and RopeSlice.
    • All iterators can now be reversed, swapping the beheavior of prev() and next().

    Bug fixes

    • The in-memory node size wasn't being computed properly, potentially resulting in unecessary memory fragmentation.
    Open source →
  15. 1.2.0 14 Jun 2020
    Release notes

    New features

    • Rope and RopeSlice can now convert between char indices and utf16 code unit indices. This useful when interacting with external APIs that use utf16 code units as their text indexing scheme.

    Dependencies

    • Updated smallvec to minimum version 1.0.
    Open source →
  16. 1.1.0 01 Sep 2019
    Release notes

    New features

    • Iterators can now be created directly to start at any position in the Rope or RopeSlice.
    • All iterators can now iterate backwards via a new prev() method.
    • All iterators now implement Clone and Debug traits.
    • Bytes, Chars, and Lines iterators now implement ExactSizeIterator.

    Changes

    • The Chunks iterator no longer yields empty chunks, for example if the Rope or RopeSlice it was created from is also empty.
    Open source →
  17. 1.0.1 01 May 2019
    Release notes

    Other

    • Converted a lot of unsafe code to safe code, with minimal performance impact.
    Open source →
  18. 1.0.0 04 Jan 2019
    Release notes

    New features

    • Implemented Eq, Ord, and PartialOrd traits for Rope and RopeSlice.
    Open source →
  19. 0.9.2 05 Oct 2018
    Release notes

    Bug fixes

    • Turns out the previous Line iterator bug fix introduced a different bug. Fixed!
    Open source →
  20. 0.9.1 03 Oct 2018
    Release notes

    Bug fixes

    • The Lines iterator would sometimes emit an extra blank line when created from a small rope slice.
    • The write_to() convenience method could potentially write only part of the rope, without any error indication.
    Open source →
  21. 0.9.0 05 Sep 2018
    Release notes

    Performance improvements

    • Minor performance improvements to a few methods on Rope and RopeSlice.

    New features

    • Added Rope::byte() for fetching individual bytes by index.
    • Added more conversion functions for Rope and RopeSlice, in the form of From impls.

    Breaking changes

    • Removed Rope::to_string(), RopeSlice::from_str(), RopeSlice::to_string(), and RopeSlice::to_rope() in favor of From impls that do the same thing.
    Open source →
  22. 0.8.4 29 Jul 2018
    Release notes

    Performance improvements

    • Minor across-the-board speedups by using SIMD better.
    • Significant speedups for Rope::insert()/remove() by being more clever about node info updates.
    • Further significant speedup to Rope::remove() due to a (performance-only) bug fix.

    Bug fixes

    • Ropey wouldn't compile on non-x86/64 platforms after the introduction of SSE2 optimizations in v0.8.3. They are now wrapped properly so that Ropey again compiles on other platforms as well.
    Open source →
  23. 0.8.3 26 Jul 2018
    Release notes

    Performance improvements

    • Significant speedups across the board by using SIMD for index conversions.
    • Loading texts from files or creating Ropes from strings is now significantly faster.

    Memory usage improvements

    • Memory overhead reduced from 17% to 10% for freshly loaded text.

    Bug fixes

    • The low-level line -> byte conversion function would sometimes return a byte index in the middle of the line break for multi-byte line break characters.
    Open source →
  24. 0.8.2 22 Jul 2018
    Release notes

    Performance improvements

    • File loading is slightly faster.

    Bug fixes

    • The low-level line break counting functions could return an incorrect count under certain circumstances. This also affected the higher-level methods in Ropey, although it was somewhat difficult to trigger in practice.
    Open source →
  25. 0.8.1 20 Jul 2018
    Release notes

    Performance improvements

    • Increased Rope::insert() speed by roughly 1.4x for small insertion strings.
    • Increased Rope::remove() speed by roughly 1.75x.

    Other

    • General documentation improvements, based on feedback.
    Open source →
  26. 0.8.0 15 Jul 2018
    Release notes

    Performance improvements

    • Building new ropes via RopeBuilder or Rope::from_str() is now about 15% faster.
    • Slicing is now almost twice as fast.
    • Fetching lines is now almost twice as fast.
    • Significant speedups for byte/char -> line index conversion methods.
    • Significant speedups for line -> byte/char index conversion methods.

    New features

    • Chunk fetching can now be done by line break index as well as byte/char index.
    • Some previously-internal utility functions for working with string slices are now part of Ropey's public API.
    • Added Rope::write_to() convenience function for writing a Rope's data to a writer.

    Breaking changes

    • Conversion from byte/char indices to line indices has been changed to be more intuitive. It is now equivalent to counting the line endings before the given byte/char index.
    • Chunk fetching now returns the starting byte/char/line of the chunk, which is generally easier to work with.
    Open source →
  27. 0.7.1 10 Jul 2018
    Release notes

    Bug fixes

    • The chunk fetching methods on slices returned bogus starting char indices.
    Open source →
  28. 0.7.0 06 Jul 2018
    Release notes

    Performance improvements

    • RopeSlices have been given a major speed boost for small slices: for contiguous slices of text in memory, they will simply point at the text without any tree structure. This makes it feasible to use RopeSlices to yield e.g. graphemes or words, even in tight inner loops, while maintaining performance.

    New features

    • You can now fetch contiguous chunks of text directly from Ropes and RopeSlices, via byte or char index. The chunk containing the given byte or char will be returned along with offset information.
    • Added more index conversion methods. For both Ropes and RopeSlices, you can now convert between any of: byte, char, and line indices.
    • Added a method to directly create RopeSlices from string slices. This isn't terribly useful when using Ropey's standard API's, but it allows for much more efficient implementations of things like custom iterators.
    • Added a method to directly access a RopeSlices text as a contiguous string slice when possible. This is useful for client code to be able to make a fast-path branch for small slices that happen to be contiguous. Like the above item, this can result in significant performance gains for certain use-cases.

    API breaking-changes

    • All grapheme related APIs have been removed. However, new APIs have been added that allow the efficient implementation of those same APIs on top of Ropey. See the grapheme examples in the examples directory of the repo for working implementations.
    Open source →
  29. 0.6.3 28 Jan 2018
    Release notes

    Features

    • Added a new Rope::insert_char() convenience method for inserting a single Unicode scalar value.

    Documentation

    • Updated the Chunks iterator docs to accurately reflect the new segmentation API in 0.6.x.
    Open source →
  30. 0.6.2 11 Jan 2018
    Release notes

    Fixes

    • 0.6.0 and 0.6.1 had an API regression where you now had to specify the segmenter in the type parameters of RopeSlice and the various iterators.
    Open source →
  31. 0.6.1 11 Jan 2018 withdrawn
    Release notes
    • No functional changes. Just updated the readme to render properly on crates.io.
    Open source →
  32. 0.6.0 11 Jan 2018 withdrawn
    Release notes

    New features

    • Grapheme segmentation can now be customized if needed.

    API changes

    • Rope::remove(), Rope::slice(), and RopeSlice::slice() now take range syntax to specify their ranges.
    Open source →
  33. 0.5.6 06 Jan 2018
    Release notes

    Documenation

    • Added a design overview document to the repo, explaining Ropey's design. Mainly targeted at potential contributors.
    • Added a more integrated example of usage to the front page of the library docs.

    Features

    • Fleshed out the PartialEq impls. Rope and RopeSlice can now be compared for equality with not just &str, but also String and Cow<str>.

    Performance

    • Rope::char(), which fetches a single Unicode scalar value as a char, is now several times faster.

    Misc

    • This changelog had the wrong year on some of its dates. Heh...
    Open source →
  34. 0.5.5 31 Dec 2017
    Release notes

    Bug fixes

    • Comparing two empty ropes for equality would panic.

    New features

    • Added Rope::capacity() and Rope::shrink_to_fit() methods. Although these are probably of limited use, they may be useful in especially memory-constrained environments.
    Open source →
  35. 0.5.4 30 Dec 2017
    Release notes

    Bug fixes

    • Rope::remove() didn't always merge graphemes between chunks properly.

    Performance and memory

    • Inserting large texts into a rope now degrades in performance more gracefully as the insertion text becomes larger, rather than hitting a sudden performance cliff.
    • Rope::remove() got a nice speed boost.
    • Memory overhead has been reduced across the board. Freshly loaded files now only have ~17% overhead, and the worst-case (built up from lots of small random-location inserts) is now ~60% overhead.

    Misc

    • 100% unit test coverage of public APIs.
    • Added randomized testing via QuickCheck.
    • Added benchmarks to the library.
    Open source →
  36. 0.5.3 28 Dec 2017
    Release notes

    Performance and memory

    • Massive speed boost for small insertions: between %40 - %50 faster.
    • Rope::from_str() now only uses stack memory for strings smaller than ~3MB. (Aside from the resulting Rope itself, of course.)

    Misc

    • Better unit test coverage of public APIs. Still not 100%, but getting there!
    Open source →
  37. 0.5.2 25 Dec 2017
    Release notes

    Bug fixes

    • There were ocassionally unnecessary heap allocations that took up a small amount of extra space in the rope.

    Misc

    • Memory overhead has been significantly reduced for ropes built up by many small coherent insertions.
    Open source →
  38. 0.5.1 24 Dec 2017
    Release notes

    Bug fixes

    • Calling Rope::line_to_char() with a line index one-past-the-end would panic. This wasn't consistent with other indexing, and has been fixed and now returns the one-past-the-end char index.
    • Had accidentally left some asserts in the Rope::remove() code that were put in during debugging. They were causing significant slow downs for removes.

    Misc

    • Added a changelog file.
    Open source →
  39. 0.5.0 23 Dec 2017

    Nothing published for this version

  40. 0.4.1 22 Dec 2017

    Nothing published for this version

  41. 0.4.0 22 Dec 2017

    Nothing published for this version

  42. 0.3.0 11 Apr 2015

    Nothing published for this version

  43. 0.2.0 03 Mar 2015

    Nothing published for this version

  44. 0.1.0 26 Feb 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive