Git Product home page Git Product logo

automerge-rs's Introduction

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. =)

automerge-rs's People

Contributors

orionz avatar alexjg avatar jeffa5 avatar vedantroy avatar ept avatar nornagon avatar scotttrinh avatar dvc94ch avatar savaki avatar dependabot[bot] avatar epompeii avatar johnrees avatar pvh avatar tylersamples avatar saki-osive avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.