A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Find a file
2021-07-05 17:51:24 +01:00
automerge Add cards example. (#198) 2021-07-05 16:22:06 +01:00
automerge-backend Avoid going through the queue when loading 2021-07-05 17:51:24 +01:00
automerge-backend-wasm Add dev command for building wasm backend (#199) 2021-06-29 17:12:24 +01:00
automerge-c Rename UncompressedChange to Change (#173) 2021-06-16 11:50:26 +01:00
automerge-c-v2 Don't document automerge-c-v2 due to name clash (#191) 2021-06-28 12:58:07 +01:00
automerge-cli Fix Clippy issues, broken tests, formatting issues (#188) 2021-06-28 13:20:21 +01:00
automerge-frontend Return an error to the user when trying to delete a non-existent key (#204) 2021-07-01 16:09:58 +01:00
automerge-protocol Fix ambiguous key deserialization (#197) 2021-06-28 18:09:18 +01:00
fuzz Fix backend panics (#141) 2021-05-20 11:24:23 +01:00
perf Use SmolStr in place of String (#182) 2021-06-19 16:28:51 +01:00
.envrc Add nix config (#61) 2021-03-24 18:15:18 +00:00
.gitignore Add nix config (#61) 2021-03-24 18:15:18 +00:00
.rustfmt.toml Add formatting config 2021-04-26 09:42:36 -07:00
.travis.yml Add dev command for building wasm backend (#199) 2021-06-29 17:12:24 +01:00
Cargo.nix Update nix (#200) 2021-06-29 17:52:38 +01:00
Cargo.toml Enable lto 2021-06-22 08:40:16 -07:00
flake.lock Fix clippy (#118) 2021-05-07 17:07:41 +01:00
flake.nix Update nix (#200) 2021-06-29 17:52:38 +01:00
LICENSE Add license 2019-12-28 13:28:37 +00:00
Makefile Add dev command for building wasm backend (#199) 2021-06-29 17:12:24 +01:00
README.md testing travis ci 2021-04-07 10:57:14 -04:00

Automerge

docs crates Build Status

This is a rust implementation of automerge. Currently this repo contains an implementation of the "backend" of the Automerge library, designed to be used via FFI from many different platforms. Very soon there will also be a frontend which will be designed for Rust application developers to use.

This project is tracking the performance branch of the JavaScript reference implementation of Automerge. The performance branch contains a lot of backwards incompatible changes and is intended to become a 1.0 release of the library, you can find more information about that here. Our goal is to release a pre 1.0 version of the rust library once the JavaScript library hits 1.0. As such we are keeping this project up to date with the frequent and often quite large changes in the performance branch of the JavaScript repo - that is to say, don't depend on anything in this repo to stay constant right now.

Using automerge-backend-wasm with automerge

This backend is tracking the performance branch of automerge

To build the wasm backend you'll need to install wasm-pack. Then:

  $ cd automerge-backend-wasm
  $ yarn release

Once it is built set the new default backend in your js application like this.

  const wasmBackend = require(path.resolve(WASM_BACKEND_PATH))
  Automerge.setDefaultBackend(wasmBackend)

Backend? Frontend?

Automerge is a JSON CRDT, in this sense it is just a data structure with a set of rules about how to merge two different versions of that data structure. However, in practice one often needs two separate roles when writing applications which use the CRDT:

  • A very low latency process, usually running on some kind of UI thread, which records changes made by the user and reflects them in the UI
  • A less latency sensitive process which executes the complex logic of merging changes received from the UI and over the network and send diffs to the frontend to apply

More details can be found here.

Note that the performance branch of automerge is under active development and is changing quickly.

Community

Development of automerge rust is currently being coordinated at our slack channel. Come say hi. =)