Commit graph

36 commits

Author SHA1 Message Date
Andrew Jeffery
0fca6a48ee Add loading to edit-trace rust benchmark 2022-03-09 18:12:05 +00:00
Orion Henry
95f27f362c
Merge pull request #283 from jeffa5/experiment-make
Separate scalars and objects in transaction API
2022-03-04 16:53:17 -05:00
Andrew Jeffery
d71e87882e Make save infallible 2022-03-04 12:28:05 +00:00
Andrew Jeffery
f8cffa3deb Fix edit trace 2022-03-04 09:51:49 +00:00
Andrew Jeffery
682b8007b9 Borrow exid to avoid &ROOT everywhere 2022-03-03 09:05:08 +00:00
Orion Henry
337fabe5a9
Merge pull request #271 from jeffa5/experiment-txn
Transaction API
2022-02-24 18:07:05 -05:00
Orion Henry
2fc0705907 change MAP,LIST,TEXT to be {},[],'' - allow recursion 2022-02-23 19:43:13 -05:00
Andrew Jeffery
3493dbd74a Rename autotxn to autocommit 2022-02-21 10:49:14 +00:00
Andrew Jeffery
50a1b4f99c Add transactable trait 2022-02-21 10:32:57 +00:00
Andrew Jeffery
59e36cebe4 Improve transactions with drop, transact and better commit
Also remove modification operations directly on Automerge and switch
tests to using AutoTxn.
2022-02-17 11:29:36 +00:00
Andrew Jeffery
e970854042 Fix benchmark ids 2022-02-16 14:56:17 +00:00
Andrew Jeffery
7cbd6effb7 Add autotxn document for wasm and cross-language use
These don't have the ability to preserve the semantics of the reference
based transaction model and so can make use of the nicer auto
transaction model.
2022-02-16 14:06:22 +00:00
Andrew Jeffery
735a4ab84c Add explicit transaction API
This removes the requirement for `&mut self`s on some of the immutable
methods on `Automerge` which can be quite inconvenient.

I've reimplemented the main functions on `Automerge` that manipulate
state to create a transaction for their op for ease of use but not
performance. I've updated the edit trace to run in a single
transaction, like on a page load.

Wasm API still needs working on at the moment to expose this properly.
2022-02-16 11:38:43 +00:00
Orion Henry
b53305cf7f Merge branch 'marks' into tmp 2022-02-10 09:42:38 -05:00
Orion Henry
2019943849 bump edition from 2018 to 2021 2022-02-03 14:38:21 -05:00
Orion Henry
e679c4f6a0 v0 wip 2022-01-31 14:02:23 -05:00
Orion Henry
a12af10ee1 optimize js 2022-01-19 18:08:15 -05:00
Alex Good
dc8140cb0b fmt 🙄 2022-01-01 20:17:38 +00:00
Orion Henry
3046cbab35
Replace the OpID API with an object ID
Rather than returning an OpID for every mutation, we now return an
`Option<ObjId>`. This is `Some` only when a `make*` operation was
applied. This `ObjID` is an opaque type which can be used with any
document.
2022-01-01 20:15:02 +00:00
Alex Good
216b4eed82 Add deny.toml and a script for calling cargo deny
In order to get cargo deny to pass we also update a few dependencies and
add licenses
2021-12-24 10:18:16 -08:00
Andrew Jeffery
7f115964f1 Unwrap text set in benchmark 2021-12-22 10:35:42 +00:00
Orion Henry
a305f77de3 Merge branch 'noop' into experiment 2021-12-19 20:08:46 -05:00
Andrew Jeffery
e6b806b458
Add criterion benchmarks for Rust (#248) 2021-12-19 14:59:40 +00:00
Alex Good
962340805c
automerge::set - don't generate ops for noops
Repeatedly setting the same value for a particular (obj, key)
combination now no longer generates an operation. To allow this we
modify the return value of `automerge::set` so that it may return an
`Option<OpId>` instead of an `OpId`.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2021-12-18 15:57:03 +00:00
Andrew Jeffery
ed6975d7ee Make a rust workspace 2021-12-17 23:41:34 +00:00
Andrew Jeffery
0c417f02b2 Improve ergonomics of the main API 2021-12-16 05:46:01 -08:00
Orion Henry
f31fa308b3 add len query - remove obj specific code from tree 2021-12-13 10:12:40 -05:00
Orion Henry
0f9115c54f cleaned up edit trace, added docs 2021-12-13 09:20:49 -05:00
Orion Henry
a1a7e42dfa remove begin - make tx implicit 2021-12-12 12:51:27 -08:00
Orion Henry
e2b63ca102 adding text() and splice_text() 2021-12-10 15:20:19 -08:00
Orion Henry
670de06bdf rework op_set query system 2021-12-10 15:35:51 -05:00
Orion Henry
0cc815ef74 move query logic into trait, format 2021-12-06 11:09:08 -05:00
Orion Henry
70b482b827 go faster 2021-12-03 21:56:59 -08:00
Orion Henry
4fe61e42d4 splice 2021-11-30 11:29:51 -08:00
Orion Henry
8ffccd96bc cleanup and op_tree 2021-11-29 19:08:32 -08:00
Orion Henry
a87fc3c1d3 profiling and seq_tree 2021-11-29 17:27:47 -07:00