Skip to content

Commit

Permalink
Merge pull request #216 from Concordium/rust-backend
Browse files Browse the repository at this point in the history
Base Rust backend implementation
  • Loading branch information
limemloh authored Oct 24, 2024
2 parents 044de62 + b3133bc commit 759f1c4
Show file tree
Hide file tree
Showing 60 changed files with 13,247 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/check-format-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Backend (Rust) Check formatting and build

on:
push:
branches: main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [ main ]

env:
RUST_FMT: "nightly-2023-04-01"
RUST_VERSION: "1.80"

jobs:
rustfmt:
name: format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check formatting
working-directory: backend-rust
run: |
rustup default ${{ env.RUST_FMT }}
rustup component add rustfmt
cargo fmt -- --color=always --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust
run: |
rustup default ${{ env.RUST_VERSION }}
rustup component add clippy
- name: Run clippy
working-directory: backend-rust
run: |
cargo clippy --color=always --tests -- -D warnings
test:
name: test
# Don't run on draft pull requests
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run unit tests
working-directory: backend-rust
run: |
rustup default ${{ env.RUST_VERSION }}
cargo test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ pgbackrest.conf
target/

.vscode/

.env
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "backend-rust/concordium-rust-sdk"]
path = backend-rust/concordium-rust-sdk
url = ../concordium-rust-sdk.git
[submodule "backend/concordium-net-sdk"]
path = backend/concordium-net-sdk
url = ../concordium-net-sdk.git

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

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

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

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

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

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

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

Loading

0 comments on commit 759f1c4

Please sign in to comment.