$ strum

v0.28.0MAJOR UPDATE

Helpful macros for working with enums and strings

Downloads: 358.2M
Recent: 67.4M
Versions: 40
Updated: February 22, 2026

Latest Update Summary

Crate

Name: strum New version: 0.28.0 Release date: 2026-02-22T15:46:16.247520Z

Crate readme

Short description Strum is a set of macros and traits for working with enums and strings easier in Rust.

Long description Strum provides macros to easily convert strings to enum variants and vice versa, along with other functionality for enumerations. It is compatible with rustc versions >= 1.71.1 and aims to support a rust version for at least two years after its release.

Features • EnumString • Display • FromRepr • AsRefStr • IntoStaticStr • EnumIter • EnumProperty • EnumMessage • EnumDiscriminants • EnumCount

Code Examples Including Strum in Your Project

 [dependencies]
strum = "0.28"
strum_macros = "0.28"

# You can also use the "derive" feature, and import the macros directly from "strum"
# strum = { version = "0.28", features = ["derive"] }

Linkshttps://crates.io/crates/strumhttps://docs.rs/strum

https://docs.rs/strum https://api.github.com/repos/Peternator7/strum/releases/289155443

Release info

Release version:

Release description

Code Examples

Minor update: 0.27.2 → 0.28.0

$ DOWNLOADS TREND

256.2M358.2M

$ VERSION HISTORY

v0.28.0February 22, 2026
v0.27.2July 19, 2025

$ LINKS

$ INSTALL

cargo add strum

Or add to Cargo.toml: strum = "0.28.0"