Skip to content

Commit

Permalink
feat: collab entities in protobuf format
Browse files Browse the repository at this point in the history
  • Loading branch information
khorshuheng committed Jul 5, 2024
1 parent 5048762 commit 464274d
Show file tree
Hide file tree
Showing 18 changed files with 1,200 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: clippy
- name: Install protobuf
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Linting
run: cargo clippy --all-targets -- -D warnings
test:
Expand All @@ -51,6 +55,11 @@ jobs:
with:
prefix-key: ${{ matrix.os }}

- name: Install protobuf
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Run tests
run: cargo test

6 changes: 5 additions & 1 deletion .github/workflows/wasm_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -30,6 +29,11 @@ jobs:
with:
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }}

- name: Install protobuf
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Build
run: cargo make wasm_build

10 changes: 6 additions & 4 deletions .github/workflows/wasm_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ jobs:
test:
name: Run Wasm Tests
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -37,5 +34,10 @@ jobs:
with:
node-version: '14'

- name: Install protobuf
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Run Wasm Tests
run: cargo make wasm_test
156 changes: 144 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions collab-entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ serde_repr = "0.1"
collab = { workspace = true }
anyhow.workspace = true
bytes = { workspace = true, features = ["serde"] }
prost = "0.12"

[build-dependencies]
prost-build = "0.12"
walkdir = "2.5.0"

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
Expand Down
Loading

0 comments on commit 464274d

Please sign in to comment.