Skip to content

Reason bindings to Automerge + experimental purely functional implementation

License

Notifications You must be signed in to change notification settings

jhrdina/bs-automerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bs-automerge

This library tries to bring CRDTs (conflict-free replicated datatypes) to OCaml/ReasonML.

It contains bindings to Automerge library and an attempt to do a pure functional Reason rewrite of the original paper.

It provides three APIs:

  • Tight Automerge binding (Automerge.Js) - API that closely copies the usage experience of the original JavaScript library, including mutations. See example.

  • Automerge binding with unified API (Automerge.UniJs) - API that emulates more idiomatic functional usage (has no visible mutations). Interface should be universal enough to stay the same even for an eventual purely functional implementation. See example

  • Purely functional implementation (Automerge.Pure) - Experimental implementation of the original paper. It is much smaller than Automerge, however it lacks a lot of features and performance improvements Automerge added on top of the article. See example.

Installation

Add the library to your project using

npm install bs-automerge

and add a corresponding item to your bsconfig.json:

"bs-dependencies": ["bs-automerge"],

See examples above for usage.

Building

Build

npm run build

Build + Watch

npm run start

Running examples

After building the project (see above), you can run the examples in the project root folder simply by

node lib/js/examples/UnifiedApi.js

and replace UnifiedApi with any other example name you wish to run. You can find their implementations in the examples folder.

About

Reason bindings to Automerge + experimental purely functional implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages