npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-jhipster-rust

v0.8.0

Published

A JHipster blueprint to generate Rust applications (monoliths and microservices) using Axum and Tokio.

Readme

generator-jhipster-rust

JHipster blueprint for generating Rust backends with Axum

NPM version

Introduction

This is a JHipster blueprint that generates a Rust backend using the Axum web framework as an alternative to the traditional Spring Boot backend. It enables you to leverage Rust's performance, safety, and low memory footprint while keeping the familiar JHipster development experience and Angular/React/Vue frontend.

The generated Rust server provides a complete REST API implementation with authentication, user management, entity CRUD operations, and full compatibility with JHipster's frontend clients.

Implemented Features

| Category | Feature | Notes | | ------------------------ | ---------------------------- | -------------------------------------------- | | Backend Framework | Axum web framework | Async HTTP server with Tower middleware | | | Tokio async runtime | High-performance async I/O | | | Structured logging (tracing) | Request tracing and structured logs | | Databases | SQLite | Default option, no external server needed | | | PostgreSQL | Full support with Diesel ORM | | | MySQL | Full support with Diesel ORM | | | MongoDB | Native driver with ObjectId, embedded docs | | Authentication | JWT (JSON Web Tokens) | Stateless auth with configurable expiry | | | OAuth2/OIDC (Keycloak) | Full OIDC flow with JWKS validation | | | Role-based access control | ROLE_USER, ROLE_ADMIN authorities | | User Management | User CRUD operations | Create, read, update, delete users | | | Password hashing (Argon2) | Secure password storage | | | Authority management | Assign/remove user roles | | Entity Generation | Basic CRUD endpoints | GET, POST, PUT, DELETE for entities | | | Field types & validations | String, Integer, Boolean, Date, Blob, etc. | | | Pagination & sorting | Page-based results with sort params | | | Relationships | ManyToOne, OneToMany, OneToOne, ManyToMany | | API Documentation | Swagger UI | Interactive API explorer at /swagger-ui | | | Scalar UI | Modern API docs at /scalar | | | OpenAPI 3.0 spec | JSON spec at /api-docs/openapi.json | | Frontend | Angular | Full JHipster Angular client | | | React | Full JHipster React client | | | Vue | Full JHipster Vue client | | Deployment | Docker support | Multi-stage Dockerfile | | | Docker Compose | Full stack with DB containers | | | Monolithic mode | Serve SPA from Rust backend | | | Microservice mode | API-only service for microservices arch | | | Consul Service Discovery | Service registration, discovery, KV config | | Testing | Rust unit tests | Service and handler tests | | | Cypress E2E tests | End-to-end UI testing | | Email | SMTP email service | Lettre + Tera templates | | | Account activation | Email verification for registration | | | Password reset | Forgot password flow with email | | Message Brokers | Apache Kafka | High-throughput async messaging (rdkafka) | | Monitoring | Prometheus metrics | HTTP request metrics with Grafana dashboards | | CI/CD | GitHub Actions | Build, test, lint, Docker publish | | | GitLab CI | Build, test, lint, Docker publish | | | Local CI with act | Run GitHub Actions locally in Docker | | Developer Experience | Hot reload (cargo-watch) | Auto-rebuild on file changes | | | Environment config (.env) | Flexible configuration | | | Health endpoints | /api/health, /management/info |

Prerequisites

As this is a JHipster blueprint, we expect you have JHipster basic knowledge:

Documentation

Entity Generation

Supported Databases

Security & Authentication

Email Integration

API Documentation

Testing

  • Testing Guide - Unit tests, integration tests, and Cypress E2E testing

Message Brokers

  • Apache Kafka Guide - High-throughput messaging with rdkafka, REST endpoints, and Docker setup

Monitoring

CI/CD

Generate CI/CD configuration for your project:

jhipster-rust ci-cd

This supports:

  • GitHub Actions - .github/workflows/main.yml with build, test, lint, and optional Docker publishing
  • GitLab CI - .gitlab-ci.yml with equivalent pipeline stages
  • Local testing - Run GitHub Actions locally using act

Deployment

Installation

To install or update this blueprint:

npm install -g generator-jhipster-rust

Usage

To use this blueprint, run the below command

jhipster-rust

You can look for updated rust blueprint specific options by running

```bash
jhipster-rust app --help

And looking for (blueprint option: rust) like

Plugin Development USAGE

To begin to work:

  • launch: npm install
  • link: npm link
  • link JHipster: npm link generator-jhipster
  • test your module in a JHipster project:
    • create a new directory and go into it
    • link the blueprint: npm link generator-jhipster-undefined
    • launch JHipster with flags: jhipster --blueprints undefined
  • then, come back here, and begin to code!

Pre-release

To use an unreleased version, install it using git.

npm install -g jhipster/generator-jhipster-rust#main
jhipster --blueprints rust --skip-jhipster-dependencies

Monolithic Deployment

For monolithic applications, you can serve the SPA UI directly from the Rust backend. This enables single-server deployment where the Rust backend serves both API endpoints and the SPA frontend.

Building the SPA Client

  1. Build the SPA client for production:

    cd client
    npm run build
  2. Copy the built files to a location the server can access:

    mkdir -p dist/static
    cp -r client/dist/<baseName>/browser/* dist/static/

Configuration

Enable static file serving by setting these environment variables in your .env file:

| Variable | Description | Default | | -------------------- | --------------------------------------------------------- | --------------- | | SERVE_STATIC_FILES | Set to true to enable static file serving | false | | STATIC_FILES_DIR | Path to the directory containing the built Angular app | ./dist/static | | APP_HTTPS | Set to true when using HTTPS (for OAuth2 redirect URLs) | false |

Example .env configuration:

SERVE_STATIC_FILES=true
STATIC_FILES_DIR=./dist/static
# APP_HTTPS=true  # Uncomment for production with TLS

Running the Server

cd server
cargo run

The server will:

  • Serve API endpoints at /api/*
  • Serve static files from the configured directory
  • Fall back to index.html for Angular routes (SPA routing)

Access the application at http://localhost:8080 (or your configured APP_PORT).

OAuth2/Keycloak Considerations

When using OAuth2 authentication with SERVE_STATIC_FILES=true:

  • The server automatically redirects to itself after authentication (instead of a separate frontend URL)
  • Set APP_HTTPS=true in production when behind a TLS-terminating proxy
  • Ensure your Keycloak client has the correct redirect URI configured (e.g., http://localhost:8080/*)

Microservice Deployment

For microservice applications, the Rust backend serves as a standalone API service without UI, designed to work with a separate gateway application.

Key Characteristics

  • API-only: No static file serving, UI is handled by gateway
  • Stateless: JWT tokens enable horizontal scaling
  • Independent: Each microservice has its own database
  • Discoverable: Health endpoints for container orchestration
  • Service Discovery: Optional Consul integration for auto-registration and discovery (see Consul Guide)

Configuration

Configure your microservice with a unique port:

APP_PORT=8081  # Use unique port for each microservice
JWT_SECRET=shared-jwt-secret-across-microservices  # Same secret for all services

Running the Microservice

cd server
cargo run

The microservice will:

  • Expose REST API endpoints at /api/*
  • Provide health checks at /api/health
  • Validate JWT tokens from the gateway

Docker Deployment

Build and run with Docker:

docker build -t myservice:latest .
docker run -p 8081:8081 -e JWT_SECRET=shared-secret myservice:latest

For detailed microservice architecture guidance, see Microservices Architecture Guide.

Not Yet Implemented

The following features from the base JHipster generator are planned for future versions:

High Priority (Core Microservices Features)

| Feature | Notes | | ------------------------- | -------------------------------------------------- | | Inter-service HTTP Client | Feign-like client with automatic token propagation | | Circuit Breaker | Resilience4j equivalent | | Kubernetes Manifests | No K8s deployment, service, ingress generation |

Medium Priority (Enterprise Features)

| Feature | Notes | | --------------------- | -------------------------------------------------------- | | Cloud Configuration | Spring Cloud Config equivalent for remote config loading | | Pulsar Message Broker | Apache Pulsar integration (Kafka is already supported) | | Distributed Tracing | Zipkin/Jaeger integration for request tracing | | Caching (Redis) | Redis dependencies or caching layer | | Gateway Routing Logic | Dynamic route management or request forwarding |

Lower Priority (Nice to Have)

| Feature | Notes | | -------------------- | -------------------------------------------------- | | WebSocket Support | tokio-tungstenite or STOMP messaging | | Additional Databases | Cassandra, Neo4j, Couchbase, MSSQL, Oracle support | | Elasticsearch | full-text search integration | | Helm Charts | Helm chart generation for Kubernetes | | Rate Limiting | throttle/rate limit middleware | | API Versioning | Routes don't use /v1, /v2 prefixes | | GraphQL | async-graphql support | | Embedded Assets | rust-embed for single-binary static files |