# maciejhirsz/logos

Create ridiculously fast Lexers

Repository: https://github.com/maciejhirsz/logos
Canonical: https://ross.abutalabs.com/products/maciejhirsz-logos
Homepage: https://logos.maciej.codes
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: lexer, lexer-generator, rust, parser, parsing
Last push: 2026-07-08T12:51:32+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 56, longevity 100
- inputs: {"age_days": 2854, "days_push": 56, "days_rel": 215, "gap_med": 64.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3550, forks 165 (observed 2026-08-28T04:08:09.506403+00:00)

## What it is
Logos is a Rust lexer generator library that derives fast tokenizers from enum definitions using token and regex attributes. It combines all token patterns into a single deterministic finite automaton optimized at compile time with lookup and jump tables.

## Use cases
- generate a lexer for a custom programming language in rust
- tokenize source code faster than a hand-written lexer
- build a tokenizer from regex patterns with a derive macro
- lex large inputs at gigabyte-per-second throughput
- write a no_std compatible tokenizer for embedded rust
- feed tokens into a hand-written parser

## When to choose
- you are writing a compiler, interpreter, or parser in Rust and need a fast lexer
- you want compile-time generated state machines instead of runtime regex matching
- you need no_std support or minimal backtracking-free tokenization

## When to avoid
- you need a full parser with grammar rules, not just tokenization
- you are not working in Rust
- you need dynamic or runtime-configurable token definitions

## Facets
- artifact type: library
- maturity: stable
- function: parser, compiler, developer-tools
- domain: parsers, programming-languages, developer-tools
- platform: rust, cross-platform
- tags: lexer-generator, tokenizer, lexical-analysis, derive-macro, no-std, finite-state-machine, compile-time-codegen

## Member repositories
- maciejhirsz/logos (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.506403+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:34:21.414607+00:00, confidence not recorded.
  - readme: https://github.com/maciejhirsz/logos (fetched 2026-08-28T04:08:09.506403+00:00, sha 74455394f00a)
  - homepage: https://logos.maciej.codes (fetched 2026-08-29T09:28:20.568211+00:00, sha 966dd9604a99)
  - site_page: https://logos.maciej.codes/getting-started.html (fetched 2026-08-29T09:28:20.570528+00:00, sha b3d72e7e46df)
  - registry_crates: https://crates.io/api/v1/crates/logos (fetched 2026-08-29T09:28:20.572337+00:00, sha dae85346fbcc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
