-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
a
committed
Aug 20, 2023
1 parent
58a2ea5
commit 919699f
Showing
10 changed files
with
112 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
exclude = ["node_modules/**/*.toml", "target/**/*.toml"] | ||
|
||
# https://taplo.tamasfe.dev/configuration/formatter-options.html | ||
[formatting] | ||
align_entries = true | ||
indent_tables = true | ||
reorder_keys = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
[workspace] | ||
|
||
members = ["packages/y-octo", "packages/y-octo-utils"] | ||
members = ["packages/y-octo", "packages/y-octo-node", "packages/y-octo-utils"] | ||
resolver = "2" | ||
|
||
[workspace.dependencies] | ||
y-octo = { workspace = true, path = "packages/y-octo" } | ||
y-octo-utils = { workspace = true, path = "packages/y-octo-utils" } | ||
[workspace.dependencies] | ||
y-octo = { workspace = true, path = "packages/y-octo" } | ||
y-octo-utils = { workspace = true, path = "packages/y-octo-utils" } | ||
|
||
[profile.release] | ||
lto = true | ||
opt-level = 3 | ||
codegen-units = 1 | ||
lto = true | ||
opt-level = 3 | ||
|
||
[profile.fast-release] | ||
inherits = "release" | ||
codegen-units = 16 | ||
lto = false | ||
inherits = "release" | ||
lto = false | ||
|
||
[profile.profiling] | ||
debug = true | ||
inherits = "fast-release" | ||
debug = true | ||
|
||
# [profile.release.package.y-octo-fuzz] | ||
# debug = 1 | ||
|
||
[patch.crates-io] | ||
lib0 = { git = "https://github.com/toeverything/y-crdt", rev = "a700f09" } | ||
yrs = { git = "https://github.com/toeverything/y-crdt", rev = "a700f09" } | ||
lib0 = { git = "https://github.com/toeverything/y-crdt", rev = "a700f09" } | ||
y-sync = { git = "https://github.com/toeverything/y-sync", rev = "aeb0010" } | ||
yrs = { git = "https://github.com/toeverything/y-crdt", rev = "a700f09" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
authors = ["DarkSky <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
name = "y-octo-node" | ||
repository = "https://github.com/toeverything/y-octo" | ||
version = "0.0.1" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pub fn add(left: usize, right: usize) -> usize { | ||
left + right | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
|
||
#[test] | ||
fn it_works() { | ||
let result = add(2, 2); | ||
assert_eq!(result, 4); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "y-octo-utils" | ||
version = "0.0.1" | ||
authors = ["x1a0t <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
name = "y-octo-utils" | ||
version = "0.0.1" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
arbitrary = { version = "1.3.0", features = ["derive"] } | ||
phf = { version = "0.11", features = ["macros"] } | ||
yrs = "=0.16.5" | ||
y-octo = { workspace = true } | ||
phf = { version = "0.11", features = ["macros"] } | ||
y-octo = { workspace = true } | ||
yrs = "=0.16.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
[package] | ||
name = "y-octo" | ||
version = "0.0.1" | ||
authors = [ | ||
"DarkSky <[email protected]>", | ||
"forehalo <[email protected]>", | ||
"x1a0t <[email protected]>", | ||
"Brooklyn <[email protected]>", | ||
"DarkSky <[email protected]>", | ||
"forehalo <[email protected]>", | ||
"x1a0t <[email protected]>", | ||
"Brooklyn <[email protected]>", | ||
] | ||
edition = "2021" | ||
license = "MIT" | ||
description = "High-performance and thread-safe CRDT implementation compatible with Yjs" | ||
edition = "2021" | ||
homepage = "https://github.com/toeverything/y-octo" | ||
repository = "https://github.com/toeverything/y-octo" | ||
keywords = ["collaboration", "crdt", "crdts", "yjs", "yata"] | ||
include = ["src/**/*", "benches/**/*", "bin/**/*", "LICENSE", "README.md"] | ||
keywords = ["collaboration", "crdt", "crdts", "yjs", "yata"] | ||
license = "MIT" | ||
name = "y-octo" | ||
readme = "README.md" | ||
repository = "https://github.com/toeverything/y-octo" | ||
version = "0.0.1" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
bitvec = "1.0" | ||
byteorder = "1.4" | ||
log = "0.4" | ||
nanoid = "0.4" | ||
nom = "7.1" | ||
bitvec = "1.0" | ||
byteorder = "1.4" | ||
log = "0.4" | ||
nanoid = "0.4" | ||
nom = "7.1" | ||
ordered-float = "3.8" | ||
rand = "0.8" | ||
rand_chacha = "0.3" | ||
serde = "1.0" | ||
serde_json = "1.0" | ||
thiserror = "1.0" | ||
rand = "0.8" | ||
rand_chacha = "0.3" | ||
serde = "1.0" | ||
serde_json = "1.0" | ||
thiserror = "1.0" | ||
|
||
[features] | ||
bench = [] | ||
|
||
[target.'cfg(fuzzing)'.dependencies] | ||
arbitrary = { version = "1.3", features = ["derive"] } | ||
arbitrary = { version = "1.3", features = ["derive"] } | ||
ordered-float = { version = "3.8", features = ["arbitrary"] } | ||
|
||
[target.'cfg(loom)'.dependencies] | ||
loom = { version = "0.6", features = ["checkpoint"] } | ||
|
||
[dev-dependencies] | ||
assert-json-diff = "2.0" | ||
criterion = { version = "0.5", features = ["html_reports"] } | ||
lib0 = { version = "0.16", features = ["lib0-serde"] } | ||
ordered-float = { version = "3.8", features = ["proptest"] } | ||
path-ext = "0.1" | ||
proptest = "1.1" | ||
proptest-derive = "0.3" | ||
y-sync = "=0.3.0" | ||
yrs = "=0.16.5" | ||
criterion = { version = "0.5", features = ["html_reports"] } | ||
lib0 = { version = "0.16", features = ["lib0-serde"] } | ||
ordered-float = { version = "3.8", features = ["proptest"] } | ||
path-ext = "0.1" | ||
proptest = "1.1" | ||
proptest-derive = "0.3" | ||
y-sync = "=0.3.0" | ||
yrs = "=0.16.5" | ||
|
||
[[bin]] | ||
name = "memory_leak_test" | ||
path = "bin/memory_leak_test.rs" | ||
|
||
[[bench]] | ||
name = "array_ops_benchmarks" | ||
harness = false | ||
name = "array_ops_benchmarks" | ||
|
||
[[bench]] | ||
name = "codec_benchmarks" | ||
harness = false | ||
name = "codec_benchmarks" | ||
|
||
[[bench]] | ||
name = "map_ops_benchmarks" | ||
harness = false | ||
name = "map_ops_benchmarks" | ||
|
||
[[bench]] | ||
name = "text_ops_benchmarks" | ||
harness = false | ||
name = "text_ops_benchmarks" | ||
|
||
[[bench]] | ||
name = "update_benchmarks" | ||
harness = false | ||
name = "update_benchmarks" | ||
|
||
[lib] | ||
bench = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Keep in sync with .editorconfig | ||
max_width = 120 | ||
tab_spaces = 4 | ||
hard_tabs = false | ||
format_strings = true | ||
wrap_comments = true | ||
format_strings = true | ||
group_imports = "StdExternalCrate" | ||
hard_tabs = false | ||
imports_granularity = "Crate" | ||
group_imports = "StdExternalCrate" | ||
max_width = 120 | ||
tab_spaces = 4 | ||
wrap_comments = true |