13 releases (5 breaking)

new 0.7.9 Dec 19, 2024
0.7.8 Dec 16, 2024
0.6.0 Dec 11, 2024
0.5.1 Dec 8, 2024
0.2.0 Nov 8, 2024

#508 in Development tools

Download history 294/week @ 2024-11-06 22/week @ 2024-11-13 14/week @ 2024-11-20 1/week @ 2024-11-27 378/week @ 2024-12-04 817/week @ 2024-12-11

1,214 downloads per month
Used in miku-server-timing

GPL-3.0-only

120KB
2K SLoC

macro-toolset

Crates.io Version docs.rs GitHub Tag

Some useful macros, to make the repetitive code less.

Features

  • str_concat almost everything
  • Hashing and encode to HEX
    • MD5
    • SHA256
    • SHA384
    • SHA512
  • Macro for creating a wrapper struct.
  • ...

The features listed in Cargo.toml:

  • dev: For development and enable all features. Not recommended since introducing axum, etc will add many dependencies.
  • feat-base64: Base64 encode and decode related utilities.
  • feat-hash: Hash algorithms (MD5, SHA256, SHA384, SHA512) related utilities.
  • feat-random: Random number / string related utilities. You shall add rand to your Cargo.toml.
  • feat-random-fast: Random number / string related utilities. You shall add rand to your Cargo.toml.
  • feat-string: String related utilities.
    • feat-string-ext-ammonia: Serializes an ammonia::Document instance without allocation.
    • feat-string-ext-axum: implement IntoResponse for StringExt.
    • feat-string-ext-base64: wrapper that indicates the inner slice should be encoded in base64 over &[u8]
    • feat-string-ext-hex: hex encoding based on const-hex, with better performance than NumStr.
    • feat-string-ext-http: crate http integration.
    • feat-string-ext-ryu: float number support.

MSRV

1.66

Notice

This crate is currently intended for personal use mostly, but contributions are welcome.

LICENSE

GPL-3.0-only

Dependencies

~0–5.5MB
~21K SLoC