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

docs: update readme.md #7

Merged
merged 7 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/y-octo-asan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Address Sanitizer

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
memory_check:
name: memory check
runs-on: ubuntu-latest
continue-on-error: true
env:
RUSTFLAGS: -D warnings -Zsanitizer=address
ASAN_OPTIONS: detect_leaks=1
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly-2023-08-19

- name: Memory Check
run: |
rustup component add rust-src --toolchain nightly-2023-08-19
cargo +nightly-2023-08-19 test -Zbuild-std --target x86_64-unknown-linux-gnu -p y-octo --lib
40 changes: 40 additions & 0 deletions .github/workflows/y-octo-memory-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Memory Leak Detect

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
miri:
name: miri code check
runs-on: ubuntu-latest
continue-on-error: true
env:
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
MIRIFLAGS: -Zmiri-backtrace=full -Zmiri-tree-borrows
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly-2023-08-19
components: miri
- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Miri Code Check
run: |
cargo +nightly-2023-08-19 miri nextest run -p y-octo -j2
46 changes: 1 addition & 45 deletions .github/workflows/y-octo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Y-Octo
name: Lint & Test & Fuzzing

on:
workflow_dispatch:
Expand Down Expand Up @@ -95,27 +95,6 @@ jobs:
name: tests
files: lcov.info

memory_check:
name: memory check
runs-on: ubuntu-latest
continue-on-error: true
env:
RUSTFLAGS: -D warnings -Zsanitizer=address
ASAN_OPTIONS: detect_leaks=1
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly-2023-08-19

- name: Memory Check
run: |
rustup component add rust-src --toolchain nightly-2023-08-19
cargo +nightly-2023-08-19 test -Zbuild-std --target x86_64-unknown-linux-gnu -p y-octo --lib

loom:
name: loom thread test
runs-on: ubuntu-latest
Expand All @@ -136,29 +115,6 @@ jobs:
run: |
cargo nextest run -p y-octo --lib

miri:
name: miri code check
runs-on: ubuntu-latest
continue-on-error: true
env:
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
MIRIFLAGS: -Zmiri-backtrace=full -Zmiri-tree-borrows
steps:
- uses: actions/checkout@v3

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly-2023-08-19
components: miri
- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Miri Code Check
run: |
cargo +nightly-2023-08-19 miri nextest run -p y-octo -j2

fuzzing:
name: fuzzing
runs-on: ubuntu-latest
Expand Down
81 changes: 79 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,87 @@
# Y-Octo

[![codecov]](https://codecov.io/gh/toeverything/y-octo)
[![docs]](https://docs.rs/crate/y-octo)
[![crates]](https://crates.io/crates/y-octo)

Y-Octo is a high-performance CRDT implementation compatible with [yjs].

Y-Octo aims to provide a thread-safe, high-performance CRDT implementation on multiple platforms and offers binary compatibility and interoperability with [yjs].
### Introduction

Y-Octo is a tiny, ultra-fast CRDT collaboration library built for all major platforms. Developers can use Y-Octo as the [Single source of truth](https://en.wikipedia.org/wiki/Single_source_of_truth) for their application state, naturally turning the application into a [local-first](https://www.inkandswitch.com/local-first/) collaborative app.

Y-Octo also has interoperability and binary compatibility with [yjs]. Developers can use [yjs] to develop local-first web applications and collaborate with Y-Octo in native apps alongside web apps.

### Code Robustness

[![Lint & Test & Fuzzing]](https://github.com/toeverything/y-octo/actions/workflows/y-octo.yml)
[![Address Sanitizer]](https://github.com/toeverything/y-octo/actions/workflows/asan.yml)
[![Memory Leak Detect]](https://github.com/toeverything/y-octo/actions/workflows/memory-test.yml)
[![codecov]](https://codecov.io/gh/toeverything/y-octo)

### Features

- ✅ Collaborative Text
- ✅ Read and write styled Unicode compatible data.
- 🚧 Add, modify and delete text styles.
- 🚧 Embedded JS data types and collaborative types.
- ✅ Collaborative types of thread-safe.
- Collaborative Array
- ✅ Add, modify, and delete basic JS data types.
- ✅ Recursively add, modify, and delete collaborative types.
- ✅ Collaborative types of thread-safe.
- 🚧 Recursive event subscription
- Collaborative Map
- ✅ Add, modify, and delete basic JS data types.
- ✅ Recursively add, modify, and delete collaborative types.
- ✅ Collaborative types of thread-safe.
- 🚧 Recursive event subscription
- 🚧 Collaborative Xml (Fragment / Element)
- ✅ Collaborative Doc Container
- ✅ YATA CRDT state apply/diff compatible with [yjs]
- ✅ State sync of thread-safe.
- ✅ Store all collaborative types and JS data types
- ✅ Update event subscription.
- 🚧 Sub Document.
- ✅ Yjs binary encoding
- ✅ Awareness encoding.
- ✅ Primitive type encoding.
- ✅ Sync Protocol encoding.
- ✅ Yjs update v1 encoding.
- 🚧 Yjs update v2 encoding.

### Testing & Linting

Put everything to the test! We've established various test suites, but we're continually striving to enhance our coverage:

- Rust Tests
- Node Tests
- Smoke Tests
- eslint, clippy

### Related projects

- [OctoBase]: The open-source embedded database based on Y-Octo.
- [yjs]: Shared data types for building collaborative software in web.

## Maintainers

- [DarkSky](https://github.com/darkskygit)
- [liuyi](https://github.com/forehalo)
- [X1a0t](https://github.com/thorseraq)
- [LongYinan](https://github.com/Brooooooklyn)

## License

Y-Octo are [MIT licensed].

[codecov]: https://codecov.io/gh/toeverything/y-octo/graph/badge.svg?token=9AQY5Q1BYH
[crates]: https://img.shields.io/crates/v/y-octo.svg
[docs]: https://img.shields.io/crates/v/y-octo.svg
[yjs]: https://github.com/yjs/yjs
[Lint & Test & Fuzzing]: https://github.com/toeverything/y-octo/actions/workflows/y-octo.yml/badge.svg
[Address Sanitizer]: https://github.com/toeverything/y-octo/actions/workflows/y-octo-asan.yml/badge.svg
[Memory Leak Detect]: https://github.com/toeverything/y-octo/actions/workflows/y-octo-memory-test.yml/badge.svg
[OctoBase]: https://github.com/toeverything/octobase
[BlockSuite]: https://github.com/toeverything/blocksuite
[AFFiNE]: https://github.com/toeverything/affine
[MIT licensed]: ./LICENSE