automerge-repo-rs icon indicating copy to clipboard operation
automerge-repo-rs copied to clipboard

Ideas for additional examples

Open gterzian opened this issue 2 years ago • 7 comments

  1. HTTP servers using an automerge document for peer discovery.
    • Use a bootstrap server where peers would get the initial document
    • Use autosurgeon.

gterzian avatar May 08 '23 06:05 gterzian

On the network, can you add a libp2p example On storage, can I add a prisma-client-rust example

RustLoverTheCoder avatar Apr 28 '24 07:04 RustLoverTheCoder

how to use fs_store as parameter to Repo::new

eberberich avatar Dec 04 '24 12:12 eberberich

You'll need to include the tokio feature and then you can use automerge_repo::tokio::FsStorage::open(<path>) to create a file system storage.

If you're not using tokio then you'll need to write an implementation of Storage which uses your runtime of choice. The automerge_repo::FsStore is intended to be wrapped in such an implementation.

alexjg avatar Dec 04 '24 13:12 alexjg

@alexjg thanks - the line with the tokio I was looking for in the repo, examples and documenation

eberberich avatar Dec 04 '24 14:12 eberberich

Yeah the issue is that it's behind a feature flag, I need to set up some stuff to get docs.rs to generate the docs for it.

alexjg avatar Dec 04 '24 14:12 alexjg

Another example that is missing: How to sync a document in a browser with a document in a rust client (using a central ws server in between. Maybe along with local changes happening on either side (say every few seconds) - and also with getting the current state of the doc in the other repo upon connection established.

We try to build it ourselves - and it's probably 'just there' - but as beginner in Rust AND automerge, it's a bit tough to connect all dots correctly - and we'd appreciate to see such an example

eberberich avatar Dec 08 '24 21:12 eberberich

Any hint on such an example?

eberberich avatar Jan 18 '25 20:01 eberberich