A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
Find a file
Orion Henry 72bc14d0a2
Merge pull request #442 from AudigoLabs/length-fix
Fixed bug with length not being set in C frontend of automerge-1.0
2022-10-15 13:59:29 -07:00
.github/workflows Add docs workflow 2022-03-03 17:31:26 +00:00
automerge clippy and fmt 2022-02-24 15:48:48 -05:00
automerge-backend clippy and fmt 2022-02-24 15:48:48 -05:00
automerge-backend-wasm Try fix unused unit lint 2022-03-03 17:51:36 +00:00
automerge-c Fixed bug with length not being set 2022-09-27 16:00:07 -07:00
automerge-c-v2 clippy and fmt 2022-02-24 15:48:48 -05:00
automerge-cli Cleaned up some warnings and errors running against Rust 1.58.1 2022-02-24 15:20:48 -05:00
automerge-frontend clippy and fmt 2022-02-24 15:48:48 -05:00
automerge-protocol clippy and fmt 2022-02-24 15:48:48 -05:00
fuzz Fix backend panics (#141) 2021-05-20 11:24:23 +01:00
perf Sync perf 2022-02-18 08:47:27 -08: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
Cargo.nix Update nix (#200) 2021-06-29 17:52:38 +01:00
Cargo.toml clippy and fmt 2022-02-24 15:48:48 -05: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 Reorder wasm-pack args (#216) 2021-07-13 12:02:54 +01:00
README.md Update readme sections mentioning performance branch (#217) 2021-07-13 16:28:08 +01:00

Automerge

docs crates Build Status

This is a rust implementation of automerge. This repo contains an implementation of the "backend" of the Automerge library, designed to be used via FFI from many different platforms, as well as a native Rust "frontend".

Using automerge-backend-wasm with 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);

and export WASM_BACKEND_PATH="$path_to_automerge_backend_wasm/build" before running.

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.

Community

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