Skip to content

Rust Example Implementation of a Hexagonal/Onion/Clean Architecture

License

Notifications You must be signed in to change notification settings

schneidersteve/buckpal-rust

Repository files navigation

Rust Example Implementation of a Hexagonal/Onion/Clean Architecture

Inspired by https://github.com/thombergs/buckpal

Tech Stack

Layers and Dependency Inversion

Dependency Inversion

Send Money Use Case

Feature: Send Money

  Scenario: Transaction succeeds
    Given a source account
    And a target account

    When money is send

    Then send money succeeds

    And source account is locked
    And source account withdrawal will succeed
    And source account is released

    And target account is locked
    And target account deposit will succeed
    And target account is released

    And accounts have been updated

Cargo Examples

cargo clean

cargo build

cargo test

cargo run

cargo install cargo-watch

cargo watch --clear -x "run"

cargo watch --clear -x "test"

cargo watch --clear -x "test -- --show-output"