Skip to content

Commit

Permalink
feat: Rust client implementation (#268)
Browse files Browse the repository at this point in the history
Implementation of the Rust client.
For more info see the
[README](https://github.com/v0-e/v4-clients/blob/rust-client/v4-client-rs/README.md).

---------

Signed-off-by: v0-e <xyz.vieira@gmail.com>
Co-authored-by: Denis Kolodin <deniskolodin@gmail.com>
Co-authored-by: Maksim Ryndin <maksim.ryndin@nethermind.io>
  • Loading branch information
3 people authored Oct 18, 2024
1 parent 9b3a6f6 commit 4dbe4c7
Show file tree
Hide file tree
Showing 83 changed files with 12,819 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: "[v4-client-js] Conventional PR Title"
name: "Conventional PR Title"
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
paths:
- 'v4-client-js/**'
- 'v4-client-rs/**'
jobs:
conventional-pr-title:
runs-on: ubuntu-latest
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/rs-build-fmt-clippy-audit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "[v4-client-rs] Build, Fmt, Clippy, Audit, & Test"

on:
pull_request:
paths:
- 'v4-client-rs/**'
push:
paths:
- 'v4-client-rs/**'
branches:
- main
- "release/*"

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./v4-client-rs

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install protoc # for dev dependencies only
run: sudo apt install -y protobuf-compiler

- name: Build
run: cargo build

- name: Check formatting
run: cargo fmt -- --check

- name: Linter
shell: bash
run: cargo clippy -- -D warnings

- name: Install audit
shell: bash
run: cargo install cargo-deny

- name: Security audit, licenses
shell: bash
run: cargo deny check licenses advisories sources

- name: Test
run: cargo test
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Python client for dYdX Chain. Developed and maintained by the Nethermind team.
- [Saul M.](https://github.com/samtin0x)
- [Piotr P.](https://github.com/piwonskp)

## v4-client-rs
Rust client for dYdX Chain. Developed and maintained by the Nethermind team.
- [Emanuel V.](https://github.com/v0-e)
- [Denis K.](https://github.com/therustmonk)
- [Maksim R.](https://github.com/maksimryndin)

## v4-client-cpp (Third Party Client)
To pull the latest C++ client, run `git submodule update --init --recursive`

Expand Down
2 changes: 2 additions & 0 deletions v4-client-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
Cargo.lock
20 changes: 20 additions & 0 deletions v4-client-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[workspace]
resolver = "2"
members = [
"client",
]

[workspace.package]
version = "0.1.0"
edition = "2021"
license = "AGPL-3.0"

[workspace.dependencies]
anyhow = "1"
async-trait = "0.1"
bigdecimal = { version = "0.4", features = ["serde"] }
derive_more = { version = "1", features = ["full"] }
log = "0.4"
thiserror = "1"
tokio = { version = "1.39", features = ["full"] }
v4-proto-rs = { git = "https://github.com/therustmonk/v4-chain", rev = "a6265bbf4cd9812382a89d32c9304c08551f7bae" }
Loading

0 comments on commit 4dbe4c7

Please sign in to comment.