# trishume/syntect

Rust library for syntax highlighting using Sublime Text syntax definitions.

Repository: https://github.com/trishume/syntect
Canonical: https://ross.abutalabs.com/products/syntect
Homepage: https://docs.rs/syntect
Language: Rust
License: MIT
License Family: permissive
Topics: syntax-highlighting, crates
Last push: 2026-04-28T19:52:59+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 79, release rhythm 17, longevity 100
- inputs: {"age_days": 3763, "days_push": 127, "days_rel": 340, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2409, forks 175 (observed 2026-08-28T04:06:44.284373+00:00)

## What it is
syntect is a Rust library for high-quality syntax highlighting that uses Sublime Text syntax definitions (grammars). It parses source code into scoped annotations and renders them as colored HTML or ANSI terminal output, with APIs suitable for building text editors.

## Use cases
- add syntax highlighting to a Rust application
- highlight code blocks to HTML for a static site or blog
- render colored code in a terminal with ANSI escapes
- build a text editor in Rust with incremental re-highlighting
- cache parse states for code intelligence features
- highlight many languages without writing custom grammars

## When to choose
- you need fast, high-quality highlighting for many languages in Rust
- you want Sublime Text / TextMate grammar compatibility including edge cases
- you're building a Rust text editor and need access to parse internals
- you want bundled syntax definitions with no external files to manage

## When to avoid
- your project is not in Rust
- you need Tree-sitter-based highlighting or error-tolerant parsing
- you need a standalone CLI highlighter rather than a library
- you need actively developed new features, since the project is mostly complete and in maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, developer-tools
- domain: developer-tools, text-editors, programming-languages
- platform: rust, cross-platform
- tags: syntax-highlighting, sublime-text-grammars, textmate, code-intelligence, html-output, ansi-terminal

## Member repositories
- trishume/syntect (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:44.284373+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-30T02:34:01.820253+00:00, confidence not recorded.
  - readme: https://github.com/trishume/syntect (fetched 2026-08-28T04:06:44.284373+00:00, sha 9e16a1fb775b)
  - homepage: https://docs.rs/syntect (fetched 2026-08-29T10:14:15.607181+00:00, sha bbf40b6387b6)
  - site_page: https://docs.rs/about/redirections (fetched 2026-08-29T10:14:15.629128+00:00, sha 1b1efd93105f)
  - site_page: https://docs.rs/about/metadata (fetched 2026-08-29T10:14:15.626930+00:00, sha 0dcdccb2b2b2)
  - site_page: https://docs.rs/ (fetched 2026-08-29T10:14:15.616041+00:00, sha 38444eb0fe60)
  - site_page: https://docs.rs/crate/syntect/latest (fetched 2026-08-29T10:14:15.617703+00:00, sha bc446488ee16)
  - site_page: https://docs.rs/crate/syntect/latest/features (fetched 2026-08-29T10:14:15.619862+00:00, sha 9b3fffd7171a)
  - site_page: https://docs.rs/about (fetched 2026-08-29T10:14:15.621378+00:00, sha 29ab7986fbf5)
  - site_page: https://docs.rs/about/badges (fetched 2026-08-29T10:14:15.622798+00:00, sha 6588cac258af)
  - site_page: https://docs.rs/about/builds (fetched 2026-08-29T10:14:15.624330+00:00, sha 811231ca4680)
- Data as of 2026-08-30T08:39:29.467469+00:00.
