curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
cargo --version
cargo new backend
cd backend
# ビルド
cargo build
# 実行
cargo run
Cargo.tomlに追加したいライブラリを記述する。 その後ビルドして実行する。
[package]
name = "backend"
version = "0.1.0"
edition = "2021"
[dependencies]
# フレームワーク
axum = { version = "0.7", features = ["macros"]}
[dev-dependencies]
# 開発側
# 全てのテスト
cargo test
# ユーザーサービスのテスト
cargo test user_services_test
# ユーザーサービスの統合テスト
cargo test --test user_services_integration_test