Skip to content

Commit

Permalink
feat(proto): add archway-proto crate (#18)
Browse files Browse the repository at this point in the history
Rust build of Archway's ProtoBuf definitions.

This package can be used both in CosmWasm smart contracts and gRPC
clients. It is based on the [`cosmos-sdk-proto
v0.18.0`](https://github.com/cosmos/cosmos-rust) crate to provide the
Cosmos SDK `v0.45.x` messages and follows the same feature definitions,
with the `tonic` gRPC clients enabled by default.

## Usage

### In CosmWasm smart contracts

```toml
archway-proto = { version = "0.1.0", default-features = false, features = ["cosmwasm"] }
```

### For the gRPC client functionality (won't work in CosmWasm)

```toml
archway-proto = "0.1.0"
```
  • Loading branch information
aelesbao authored Oct 13, 2023
2 parents 7e1cd26 + eb5ed1e commit 3da2b00
Show file tree
Hide file tree
Showing 17 changed files with 3,967 additions and 152 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -23,6 +27,9 @@ jobs:
override: true
profile: minimal

- name: Install Protoc
uses: arduino/setup-protoc@v2

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
Expand All @@ -35,7 +42,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --lib --target wasm32-unknown-unknown
args: --release --lib --target wasm32-unknown-unknown --no-default-features
env:
RUSTFLAGS: "-C link-arg=-s"

Expand All @@ -49,7 +56,11 @@ jobs:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -59,6 +70,9 @@ jobs:
profile: minimal
components: rustfmt, clippy

- name: Install Protoc
uses: arduino/setup-protoc@v2

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "archway-network"]
path = archway-network
url = https://github.com/archway-network/archway
branch = tags/v4.0.2
Loading

0 comments on commit 3da2b00

Please sign in to comment.