Skip to content

Commit 64cd621

Browse files
authored
sui-rpc: introduce support for gRPC api (#119)
Introduce infrastructure for generating protobuf and gRPC bindings for the new gRPC api.
1 parent 1d6f337 commit 64cd621

File tree

97 files changed

+56222
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+56222
-16
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,65 @@ jobs:
2525
rustc --version
2626
cargo --version
2727
28-
- uses: taiki-e/install-action@cargo-hack
2928
- uses: taiki-e/install-action@cargo-nextest
3029

30+
- name: Run tests
31+
run: make test
32+
33+
- run: make is-dirty
34+
35+
check-features:
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: rust version
43+
run: |
44+
rustc --version
45+
cargo --version
46+
47+
- uses: taiki-e/install-action@cargo-hack
48+
3149
- name: feature compatibility
3250
run: make check-features
3351

52+
- run: make is-dirty
53+
54+
lint:
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
61+
- name: rust version
62+
run: |
63+
rustc --version
64+
cargo --version
65+
3466
- name: rustfmt
3567
run: make check-fmt
3668

3769
- name: clippy
3870
run: make clippy
3971

40-
- name: Run tests
41-
run: make test
72+
- run: make -C crates/sui-rpc proto
73+
74+
- run: make is-dirty
75+
76+
docs:
77+
runs-on: ubuntu-latest
78+
79+
steps:
80+
- name: Checkout repository
81+
uses: actions/checkout@v4
82+
83+
- name: rust version
84+
run: |
85+
rustc --version
86+
cargo --version
4287
4388
- name: rustdoc
4489
run: make doc

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[workspace]
22
resolver = "2"
33
members = ["crates/*"]
4+
5+
# pbjson-build is vendored with a patch to generate compliant protobuf json
6+
# bindings
7+
exclude = ["crates/proto-build/pbjson-build"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ clippy: ## Run Clippy linter
2121

2222
.PHONY: test
2323
test: ## Run unit tests
24-
cargo nextest run --all-features -p sui-sdk-types -p sui-crypto
24+
cargo nextest run --all-features -E '!package(sui-graphql-client) and !package(sui-graphql-client-build) and !package(sui-transaction-builder)'
2525
cargo test --all-features --doc
2626

2727
package_%.json: crates/sui-transaction-builder/tests/%/Move.toml crates/sui-transaction-builder/tests/%/sources/*.move ## Generate JSON files for tests

crates/proto-build/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "proto-build"
3+
version = "0.0.0"
4+
edition = "2024"
5+
publish = false
6+
7+
[dependencies]
8+
prost-types = "0.13.3"
9+
prost = "0.13"
10+
protox = "0.7"
11+
tonic-build = "0.13"
12+
walkdir = "2.5.0"
13+
quote = "1.0.40"
14+
proc-macro2 = "1.0.95"
15+
syn = "2.0.104"
16+
prettyplease = "0.2.35"
17+
pbjson-build = { path = "pbjson-build" }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
Cargo.lock
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
name = "pbjson-build"
3+
version = "0.7.0"
4+
authors = ["Raphael Taylor-Davies <r.taylordavies@googlemail.com>"]
5+
edition = "2021"
6+
description = "Generates Serialize and Deserialize implementations for prost message types"
7+
license = "MIT"
8+
keywords = ["protobuf", "json", "serde"]
9+
categories = ["encoding"]
10+
repository = "https://github.com/influxdata/pbjson"
11+
publish = false
12+
13+
[dependencies]
14+
heck = "0.5"
15+
prost = "0.13"
16+
prost-types = "0.13"
17+
itertools = "0.13"
18+
19+
[dev-dependencies]
20+
tempfile = "3.1"

0 commit comments

Comments
 (0)