Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for additional examples #1

Open
gterzian opened this issue May 8, 2023 · 6 comments
Open

Ideas for additional examples #1

gterzian opened this issue May 8, 2023 · 6 comments
Assignees

Comments

@gterzian
Copy link
Collaborator

gterzian commented May 8, 2023

  1. HTTP servers using an automerge document for peer discovery.
    • Use a bootstrap server where peers would get the initial document
    • Use autosurgeon.
@gterzian gterzian changed the title Idea for additional examples Ideas for additional examples May 8, 2023
@RustLoverTheCoder
Copy link

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

@eberberich
Copy link

eberberich commented Dec 4, 2024

how to use fs_store as parameter to Repo::new

@alexjg
Copy link
Collaborator

alexjg commented Dec 4, 2024

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.

@eberberich
Copy link

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

@alexjg
Copy link
Collaborator

alexjg commented Dec 4, 2024

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.

@eberberich
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants