Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Starter template using Rust with Axum, Async-GraphQL, PostgreSQL, and Redis for building high-performance web APIs.

License

NotificationsYou must be signed in to change notification settings

rust-dd/rust-axum-async-graphql-postgres-redis-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A modern Rust backend starter template using:

  • Axum for HTTP/WebSocket server
  • Async-GraphQL for GraphQL APIs
  • PostgreSQL viatokio-postgres andbb8 async connection pool
  • Redis viabb8-redis async connection pool
  • Firebase Auth integration
  • WebSocket support
  • Jemalloc for improved memory performance

Requirements

  • Rust 1.85+ (2024 edition)
  • PostgreSQL server
  • Redis server

Getting Started

1. Clone the repo

git clone https://github.com/rust-dd/rust-axum-async-graphql-postgres-redis-starter.gitcd rust-axum-async-graphql-postgres-redis-starter

2. Setup environment

Create a.env file in the project root:

POSTGRES_HOST=localhostPOSTGRES_PORT=5432POSTGRES_USER=postgresPOSTGRES_PASSWORD=passwordPOSTGRES_DB=postgresREDIS_HOST=redis://localhost:6379FIREBASE_PROJECT_ID=firebase_projectADMIN_SECRET=admin1234

3. Run the project

cargo run

4. Access the GraphQL Playground

Once running, open:http://localhost:8000/graphql

Performance

This project usesjemallocator as the global allocator for improved memory allocation performance in high-throughput environments and simd-json for fast JSON operations.

#[global_allocator]staticGLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

License

MIT

About

Starter template using Rust with Axum, Async-GraphQL, PostgreSQL, and Redis for building high-performance web APIs.

Resources

License

Stars

Watchers

Forks

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp