mcpField
A
axum-rust-template

axum-rust-template

github.com/rebyteai-template開発1766 回インストール19 週間前に更新
リポジトリ

axum-rust-template について

PostgreSQL を使う開発プロジェクト向けの、Rust API 用 Axum テンプレートです。Diesel ORM と DDD アーキテクチャを採用し、ビルド、データベースマイグレーション、実行の基本手順を示します。

主な機能

  1. 01Axum による API 構築
  2. 02Rust と Diesel ORM の利用
  3. 03DDD アーキテクチャの採用
  4. 04PostgreSQL データベースの設定

活用シーン

  1. 01Rust API プロジェクトの開始
  2. 02Diesel を使うサービスの作成
  3. 03PostgreSQL プロジェクトの基盤構築

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/rebyteai-template/rebyte-skills --skill axum-rust-template

インストール後、Claude Code で/axum-rust-templateを入力して読み込まれたか確認します。

詳細

Axum Rust API

Diesel ORM と DDD アーキテクチャを使用した Rust Axum API です。

技術スタック

  • フレームワーク:Axum
  • 言語:Rust
  • ORM:Diesel
  • アーキテクチャ:DDD
  • データベース:PostgreSQL

前提条件

  • Rust ツールチェーンがインストールされていること
  • PostgreSQL

セットアップ

1. テンプレートをクローンする
git clone --depth 1 https://github.com/Eng0AI/axum-rust-template.git .

ディレクトリが空でない場合:

git clone --depth 1 https://github.com/Eng0AI/axum-rust-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. Git の履歴を削除する(任意)
rm -rf .git
git init
3. プロジェクトをビルドする
cargo build
4. データベースをセットアップする

データベースを設定し、Diesel のマイグレーションを実行します。

開発

cargo run

コメント