Skip to content

Repository files navigation

Rust Framework Libraries

Apache-2.0 licensed CI Status

This repository provides a collection of Rust libraries and utilities to aid application and service development within Juspay. However, we aim to keep these libraries generic enough so that they remain useful for the broader Rust community as well.

Available Crates

  • log_utils: A configurable logging infrastructure built on the tracing ecosystem.
  • build_info: Utilities for extracting information about the build environment and Cargo workspace.
  • metrics_utils: Utilities for configuring and managing OpenTelemetry metrics pipelines with OTLP and Prometheus export.
  • hyperswitch_masking: Personally Identifiable Information (PII) protection through wrapper types and traits for secret management, ensuring sensitive data isn't accidentally exposed in logs or debug output.

Roadmap

We plan to expand this collection with additional utilities commonly needed in production Rust applications.

  • log_utils:
    • Add support for the tracing ecosystem
    • Add support for the fastrace ecosystem
  • Metrics support:
    • Support for exporting metrics over OTLP
    • Support for Prometheus pull-based metrics export
  • HTTP client utilities
    • Optionally, include metrics support
  • HTTP server utilities
    • Optionally, include metrics support
    • Middleware for the axum server
    • Middleware for the actix-web server
  • Database related utilities
    • Macros to provide common implementations
    • Functions / queries for commonly performed operations.
      • Optionally, include metrics support
    • Can support PostgreSQL and MySQL
  • Redis related utilities:
    • An easy / simple interface to work with Redis
    • Optionally, include metrics support
  • Kafka related utilities:
    • An easy / simple interface to work with Kafka
    • Optionally, include metrics support

Preferably, we'd like to keep things in smaller, individual crates rather than including everything in one single crate. This would allow users to pull specific crates based on their requirements.

Additionally, when supporting multiple underlying libraries / ecosystems or adding optional features (such as observability), we can make use of Cargo features, rather than having everything available by default.

Contributing

While primarily developed for internal use, we welcome contributions that improve the libraries' quality, performance, or usability. Please ensure any contributions maintain backward compatibility (as much as possible) and include appropriate tests.

License

All crates in this repository are licensed under the Apache-2.0 license.

About

A collection of Rust libraries and utilities to aid application development.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages