Crate

bitflags

Macro for generating type-safe bitfield flag types.

What it is

bitflags! generates a newtype over an integer representing a set of named bit flags. The generated type implements bitwise operations (|, &, ^, !), Display, Debug, and iteration over the currently set flags.

Why it is commonly used

Used in system programming, graphics, OS wrappers, and protocol implementations that use bit fields — file permissions, event masks, capability flags, window style bits, and protocol option fields.

623
Repositories
90%
Actively maintained
562
Updated ≤ 30 days
2.4M
Total stars
531
Owners

Counted from the Cargo.toml manifests of the 623 indexed repositories that declare bitflags as a dependency — not download counts. Dependency data last verified 2026-08-13.

Browse 623 repositories using bitflags in Repos →
Often used with

Crates that show up unusually often in bitflags projects. The most distinctive pairings rank first — crates these projects use far more than the average indexed Rust project does, not just crates that are popular everywhere. Each percentage is the share of bitflags projects that also use it.

Used by these organizations
50 of 623 repositories · ranked by stars · 562 pushed in the last 30 days
bun95kactive

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

⑂ 5.0k8.0k
servo38kactive

Servo aims to empower developers with a lightweight, high-performance alternative for embedding web technologies in applications.

⑂ 3.7k3.1k
delta32kactive

A syntax-highlighting pager for git, diff, grep, rg --json, and blame output

⑂ 555420
Graphite27kactive

Community-built comprehensive 2D content creation appplication for graphic design, digital art, and interactive real-time motion graphics powered by a node-based procedural graphics engine

windmill18kactive

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.

sqlx17kmaintenance

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.

dbt-core14kactive

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

← Browse all repos