Commit graph

96 commits

Author SHA1 Message Date
Andrew Jeffery
987263b25d
Add SortedVec struct to ensure preds are sorted (#176)
* Add SortedVec struct to ensure preds are sorted

* Add into_iter for sortedvec
2021-06-19 17:25:25 +01:00
Andrew Jeffery
fc1b8f87fb
Use SmolStr in place of String (#182)
Most of the strings are small and so fit nicely in a SmolStr. When they
don't it just reverts to using a normal String.
2021-06-19 16:28:51 +01:00
Andrew Jeffery
ff8b8613d5
Flatten objtype (#175)
* Flatten object type

* Use separate construct functions

* Use separate gen_*_diff functions

* Remove maptype and seqtype from Diffs

* Preallocate ops in new_map_or_table

* More preallocations
2021-06-17 20:06:10 +01:00
Andrew Jeffery
8b3938c2e7
Rename UncompressedChange to Change (#173)
It wasn't really uncompressed as we have compressed and uncompressed
changes in the backend. It is just not encoded into the binary format.
The module separation (protocol vs backend) should help with the
distinction.
2021-06-16 11:50:26 +01:00
Andrew Jeffery
a6e955abfd
Rework statetree to be a tree (#156) 2021-06-14 11:08:14 +01:00
Vedant Roy
ae3c3cd563 Avoid return 2021-05-27 17:17:16 -07:00
Vedant Roy
5f7628143d Use return... a bit less 2021-05-27 16:58:16 -07:00
Vedant Roy
f2c0a4953e Report incorrect variant error to serde in RawDiffType::deserialize 2021-05-27 16:54:34 -07:00
Alex Good
623d09d19f Report incorrect variant error to serde in RawOpType::deserialize 2021-05-28 00:40:09 +01:00
Vedant Roy
32f0821e0e Make another enum work with msgpack 2021-05-27 16:33:49 -07:00
Vedant Roy
c845351224 Serialize/Deserialize OpType so it works with msgpack 2021-05-27 15:54:07 -07:00
Vedant Roy
2659efc335 Change outdated error message 2021-05-24 13:17:37 -07:00
Vedant Roy
aaccefcb11 Switch back to using Vec<u8> 2021-05-24 13:17:37 -07:00
Vedant Roy
22af56b059 Internal representation = base64 string 2021-05-24 13:17:37 -07:00
Vedant Roy
41021f398f Add bytes type 2021-05-24 13:17:37 -07:00
Orion Henry
3465517ab3 handle conflicts in list parent modifications 2021-05-24 14:59:09 -04:00
Alex Good
9bbaf7cbd5 Merge branch 'main' into implement-new-sequence-patch-format 2021-05-17 13:03:57 +01:00
Andrew Jeffery
5637956895 Add custom RootDiff type
This ensures that the patch starts with the right diff type statically
and will give an error to js during deserialization.
2021-05-16 14:02:57 +01:00
Andrew Jeffery
2e07e93e72 Change patches diffs to be non-optional 2021-05-16 13:01:37 +01:00
Andrew Jeffery
2aa35bc349
Add derive Arbitrary support behind cargo feature (#124) 2021-05-14 16:38:35 +01:00
Andrew Jeffery
9ace8892f6 Remove unchanged diff
Uses empty edits or props instead.
2021-05-11 12:48:45 +01:00
Andrew Jeffery
6050f39d46 Change patch diffs to start with mapdiff 2021-05-11 09:26:19 +01:00
Andrew Jeffery
4caa9798d6 Don't skip props 2021-05-10 23:43:59 +01:00
Andrew Jeffery
59a24081d2 Switch to expanded_op more 2021-05-10 19:25:43 +01:00
Andrew Jeffery
d794ad4dd5 Update diffedit naming of fields and add comments
This brings the DiffEdit types more in line with the typescript ones and
fixes the names. Also changed to using match guards in the append_edit
function so we can take edit by value.
2021-05-10 13:19:48 +01:00
Andrew Jeffery
9c522cb587 Handle collapsing inserts in edits 2021-05-10 12:27:28 +01:00
Alex Good
e86aabb6a3 Implement new sequence patch format 2021-05-05 21:52:57 +01:00
Andrew Jeffery
3a8447c068
Remove automerge bench harness (#106)
This removes the default wrapper which throws errors with some cli
arguments, e.g. --save-baseline which is nice for being able to compare
versions!
2021-04-27 10:30:07 +01:00
Andrew Jeffery
d1934f2286 Add formatting config 2021-04-26 09:42:36 -07:00
Andrew Jeffery
0a377a858b Catch up with js changes 2021-04-24 14:25:31 -07:00
Andrew Jeffery
137e6d2808 Fix clippy lints 2021-04-07 08:07:53 -07:00
Andrew Jeffery
2cc7b60ccb
Update uuid (#52)
This enables it to work for wasm32.
2021-03-18 12:38:05 +00:00
Alex Good
c103b0638e Ritual abasement at the altar of clippy 2021-03-02 19:35:00 +00:00
Alex Good
4f4674a4a1 Implement cursors in frontend 2021-03-02 16:07:52 +00:00
Alex Good
26dfc7ea40 Implement cursor logic in backend 2021-02-12 12:03:10 -05:00
Alex Good
2d31952d77 Implement encoding and decoding of cursor operations 2021-02-12 12:03:10 -05:00
Alex Good
8f9d66d4f2 Add CursorDiff and serde impls 2021-02-12 12:03:10 -05:00
Alex Good
0b99082c67 Add Cursor data type and serde impls for it 2021-02-12 12:03:10 -05:00
Orion Henry
c135b02a48 full document compression 2021-01-29 17:55:59 -05:00
Alex Good
ae4b9f8f94 Add some benchmarks and make some performance related tweaks 2021-01-25 13:49:38 +00:00
Orion Henry
ddb7090f2c Merge branch 'main' of github.com:automerge/automerge-rs into main 2021-01-22 13:52:45 -05:00
Orion Henry
9a90a8f84c add full document decompression 2021-01-22 13:32:50 -05:00
Alex Good
8142d42796 Add first crdt benchmark and some frontend optimisations 2021-01-20 15:18:47 +00:00
Alex Good
497372db99 Immutable frontend rewrite 2021-01-16 17:40:47 +00:00
Orion Henry
d11a0f6b73 fix extra_bytes serialization w field missing 2021-01-14 12:30:25 -05:00
Alex Good
7cd1a059f5 Add proptest for serialization 2021-01-14 12:30:25 -05:00
Alex Good
3c4d64c8a0 Add extra_bytes 2021-01-14 12:30:25 -05:00
Alex Good
3187afcc51 Use more expressive Operation structure 2021-01-14 12:30:25 -05:00
Alex Good
ce38f5360b Move automerge_backend::UnencodedChange -> automerge_protocol::UncompressedChange 2021-01-14 12:30:25 -05:00
Orion Henry
0b469640d4 update format-tweaks to serialize properly 2021-01-12 14:45:32 -05:00