summaryrefslogtreecommitdiffstats
path: root/src/document/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-19 13:48:39 +0000
committertv <tv@krebsco.de>2026-11-19 14:53:44 +0100
commitc1bf987314774d135316d95480baeb6eb7e1dc70 (patch)
tree6af5e2f654793d75a30c2f5afbae978e8d1f4fd8 /src/document/mod.rs
parent3b4d0cc4f167ca77d74110cb59c9c85276723965 (diff)
release: --version says what decides which builds work together
`continuum --version` and `continuum-party --version` say, after the release, the wire versions the build speaks, the federation and the revisions of it it knows (with the `federation` feature), and the Automerge version it makes documents with: continuum 1.0.0 wire versions 52 to 52 federation 1: the base revision, revision 1 (merge-events) automerge 0.12.0 `-V` says the release alone, as before; continuum-party had no version at all. The Automerge version is the one the crate itself reports (`document::engine_version`), so it follows Cargo.lock.
Diffstat (limited to 'src/document/mod.rs')
-rw-r--r--src/document/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/document/mod.rs b/src/document/mod.rs
index e548d01..530e6b6 100644
--- a/src/document/mod.rs
+++ b/src/document/mod.rs
@@ -13,6 +13,12 @@ pub(crate) use automerge::{
ScalarValue,
};
+/// The version of Automerge this build makes documents with: a remake needs the same on
+/// every node, and a federation the same encoding of a change (`remake::snapshot`).
+pub(crate) fn engine_version() -> &'static str {
+ Document::new().stats().cargo_package_version
+}
+
/// How many writers (actors) `doc`'s changes have: from the changes' metadata, in
/// time proportional to the document.
pub(crate) fn writers(doc: &Document) -> usize {