A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Find a file
2020-11-09 14:23:24 -05:00
automerge Cleanup, add deserialization for DiffLink 2020-04-10 14:36:12 +01:00
automerge-backend remove extra clone 2020-11-09 14:23:24 -05:00
automerge-backend-wasm refactor process_request to feed the ops in one at a time removing the 2020-11-09 09:48:45 -05:00
automerge-c adding getMissingDeps and getChanges to C API 2020-09-09 13:46:00 -04:00
automerge-cli fix automerge-cli ftbfs () 2020-11-08 14:47:00 +00:00
automerge-frontend cli: Add import command () 2020-06-08 20:01:55 +01:00
automerge-protocol refactor process_request to feed the ops in one at a time removing the 2020-11-09 09:48:45 -05:00
.gitignore Add travis 2019-12-28 14:52:05 +00:00
.travis.yml Remove deploy from Travis setup 2020-03-12 16:49:48 +00:00
Cargo.toml Merge branch 'performance' into frontend 2020-05-13 17:53:47 +01:00
LICENSE Add license 2019-12-28 13:28:37 +00:00
README.md add link to instructions for installing wasm-pack () 2020-11-08 14:47:40 +00: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 beeing coordinated at our slack channel. Come say hi. =)