# Operational Transforms
[![Hex.pm](https://img.shields.io/hexpm/v/ot_ex_rust)](https://hex.pm/packages/ot_ex_rust)
[![Documentation](https://img.shields.io/badge/hex-docs-blue)](https://hexdocs.pm/ot_ex_rust)
This Elixir library contains an implementation of [operational transformations][ot] for strings.
It is the same general algorithm as [ottypes/text][ot_text], but made invertible.
The implementation of the library a Rust NIF (with `rustler_precompiled` support) for increased throughput.
The original implementation of this library, written in pure Elixir, can be found [here][ot_ex].
## Installation
Install the package by adding `ot_ex` to your list of dependencies in `mix.exs` **along with the `hex` option**:
```elixir
def deps do
[
{:ot_ex, "~> 0.2.0-rc1", hex: :ot_ex_rust}
]
end
```
Then run `mix deps.get`.
## Testing
To run the basic tests, run `mix test`.
There are also some longer fuzz tests available that are quite slow.
These can be included in the suite by running `mix test --include slow_fuzz`.
This repo also has [Credo][credo] and [Dialyzer][dialyxir] checks that can be run with `mix lint`.
[credo]: https://github.com/rrrene/credo
[dialyxir]: https://github.com/jeremyjh/dialyxir
[ot]: https://en.wikipedia.org/wiki/Operational_transformation
[ot_ex]: https://github.com/jclem/ot_ex
[ot_text]: https://github.com/ottypes/text