From 0faa860d594cae7c5e2628d298cb79e22c535b66 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Sun, 11 Aug 2024 11:04:53 +0800 Subject: [PATCH] docs: rm warning --- crates/examples/examples/sheet.rs | 6 +- crates/loro-internal/fuzz/Cargo.lock | 90 ++++++++++++++++++++++++---- crates/loro-wasm/README.md | 3 - loro-js/README.md | 3 - 4 files changed, 81 insertions(+), 21 deletions(-) diff --git a/crates/examples/examples/sheet.rs b/crates/examples/examples/sheet.rs index 3c06a406..cb1c1283 100644 --- a/crates/examples/examples/sheet.rs +++ b/crates/examples/examples/sheet.rs @@ -55,6 +55,8 @@ pub fn main() { after_free_history_cache - after_compact_change_store ); - let snapshot = doc.export_snapshot(); - println!("Snapshot size: {}", ByteSize(snapshot.len())); + println!( + "ChangeStore size: {}", + ByteSize(doc.with_oplog(|log| log.change_store_kv_size())) + ); } diff --git a/crates/loro-internal/fuzz/Cargo.lock b/crates/loro-internal/fuzz/Cargo.lock index 2137903c..648738ab 100644 --- a/crates/loro-internal/fuzz/Cargo.lock +++ b/crates/loro-internal/fuzz/Cargo.lock @@ -59,6 +59,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "bitmaps" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" + [[package]] name = "bytecount" version = "0.6.3" @@ -71,6 +77,12 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" + [[package]] name = "cc" version = "1.0.77" @@ -150,6 +162,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -210,7 +228,7 @@ dependencies = [ "arref", "fxhash", "heapless 0.7.16", - "itertools", + "itertools 0.11.0", "loro-thunderdome", "proc-macro2", ] @@ -286,7 +304,7 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ - "bitmaps", + "bitmaps 2.1.0", "rand_core", "rand_xoshiro", "sized-chunks", @@ -294,6 +312,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "imbl" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc3be8d8cd36f33a46b1849f31f837c44d9fa87223baee3b4bd96b8f11df81eb" +dependencies = [ + "bitmaps 3.2.1", + "imbl-sized-chunks", + "rand_core", + "rand_xoshiro", + "version_check", +] + +[[package]] +name = "imbl-sized-chunks" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "144006fb58ed787dcae3f54575ff4349755b00ccc99f4b4873860b654be1ed63" +dependencies = [ + "bitmaps 3.2.1", +] + [[package]] name = "itertools" version = "0.11.0" @@ -303,6 +343,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.4" @@ -353,11 +402,12 @@ dependencies = [ [[package]] name = "loro-common" -version = "0.5.0" +version = "0.16.2" dependencies = [ "arbitrary", "enum-as-inner 0.6.0", "fxhash", + "leb128", "loro-rle", "nonmax", "serde", @@ -368,7 +418,7 @@ dependencies = [ [[package]] name = "loro-delta" -version = "0.5.0" +version = "0.16.2" dependencies = [ "arrayvec", "enum-as-inner 0.5.1", @@ -379,22 +429,25 @@ dependencies = [ [[package]] name = "loro-internal" -version = "0.5.0" +version = "0.16.2" dependencies = [ "append-only-bytes", "arbitrary", "arref", + "bytes", + "either", "enum-as-inner 0.5.1", "enum_dispatch", "fxhash", "generic-btree", "getrandom", "im", - "itertools", + "itertools 0.12.1", "leb128", "loro-common", "loro-delta", "loro-rle", + "loro_fractional_index", "md5", "num", "num-derive", @@ -421,7 +474,7 @@ dependencies = [ [[package]] name = "loro-rle" -version = "0.5.0" +version = "0.16.2" dependencies = [ "append-only-bytes", "arref", @@ -437,6 +490,16 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f3d053a135388e6b1df14e8af1212af5064746e9b87a06a345a7a779ee9695a" +[[package]] +name = "loro_fractional_index" +version = "0.16.2" +dependencies = [ + "imbl", + "rand", + "serde", + "smallvec", +] + [[package]] name = "md5" version = "0.7.0" @@ -599,11 +662,12 @@ checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "postcard" -version = "1.0.2" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2b180dc0bade59f03fd005cb967d3f1e5f69b13922dad0cd6e047cb8af2363" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" dependencies = [ "cobs", + "embedded-io", "heapless 0.7.16", "serde", ] @@ -748,11 +812,11 @@ dependencies = [ [[package]] name = "serde_columnar" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d54dd7e7a1ec134c842f8a3bdb5a1fc662d002682e0457f976f3046cf9ccf8" +checksum = "3748cbf2b43a15ee9627881cabd7820d50508781cdebd3bb54cea49215d367a1" dependencies = [ - "itertools", + "itertools 0.11.0", "postcard", "serde", "serde_columnar_derive", @@ -805,7 +869,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" dependencies = [ - "bitmaps", + "bitmaps 2.1.0", "typenum", ] diff --git a/crates/loro-wasm/README.md b/crates/loro-wasm/README.md index 48c4c7fc..2a6cc838 100644 --- a/crates/loro-wasm/README.md +++ b/crates/loro-wasm/README.md @@ -40,9 +40,6 @@ https://github.com/loro-dev/loro/assets/18425020/fe246c47-a120-44b3-91d4-1e7232a5b4ac - -> ⚠️ **Notice**: The current API and encoding schema of Loro are **experimental** and **subject to change**. You should not use it in production. - Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) library that makes building [local-first apps][local-first] easier. It is currently available for JavaScript (via WASM) and Rust developers. Explore our vision in our blog: [**✨ Reimagine State Management with CRDTs**](https://loro.dev/blog/loro-now-open-source). diff --git a/loro-js/README.md b/loro-js/README.md index 48c4c7fc..2a6cc838 100644 --- a/loro-js/README.md +++ b/loro-js/README.md @@ -40,9 +40,6 @@ https://github.com/loro-dev/loro/assets/18425020/fe246c47-a120-44b3-91d4-1e7232a5b4ac - -> ⚠️ **Notice**: The current API and encoding schema of Loro are **experimental** and **subject to change**. You should not use it in production. - Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) library that makes building [local-first apps][local-first] easier. It is currently available for JavaScript (via WASM) and Rust developers. Explore our vision in our blog: [**✨ Reimagine State Management with CRDTs**](https://loro.dev/blog/loro-now-open-source).