diffs-syntect 0.1.0

Fork of syntect 5.3.0 maintained only for diffs-rs: shares compiled regexes within a syntax set, reuses search scratch, skips impossible searches, and reports parser-state memory. Use upstream syntect (https://github.com/trishume/syntect) instead.
Documentation
[package]
name = "diffs-syntect"
# Fork version, independent of upstream. The upstream base is syntect 5.3.0;
# see README.md and PATCHES.md.
version = "0.1.0"
authors = ["Tristan Hume <tristan@thume.ca>"]
edition = "2021"
license = "MIT"
description = "Fork of syntect 5.3.0 maintained only for diffs-rs: shares compiled regexes within a syntax set, reuses search scratch, skips impossible searches, and reports parser-state memory. Use upstream syntect (https://github.com/trishume/syntect) instead."
readme = "README.md"
repository = "https://github.com/plannotator/diffs-rs"
homepage = "https://github.com/plannotator/diffs-rs/tree/main/crates/diffs-syntect"
keywords = ["syntax", "highlighting", "highlighter"]
categories = ["parser-implementations", "parsing", "text-processing"]
# Upstream declares no minimum; this fork is only built and tested with diffs-rs.
rust-version = "1.88"
# testdata/ holds upstream test inputs (about 8 MB); it stays in Git only.
include = [
    "/src/**/*.rs",
    "/src/**/*.md",
    "/assets/default.themedump",
    "/assets/default_metadata.packdump",
    "/assets/default_newlines.packdump",
    "/assets/default_nonewlines.packdump",
    "/Cargo.toml",
    "/README.md",
    "/PATCHES.md",
    "/UPSTREAM_README.md",
    "/CHANGELOG.md",
    "/LICENSE.txt",
]
# Not published yet. RELEASE_READINESS.md in diffs-rs gives the publish order.

[package.metadata.diffs-rs.upstream]
crate = "syntect"
version = "5.3.0"
repository = "https://github.com/trishume/syntect"
revision = "e4670846ecf16d8832db6c43d531bec466214e27"
crate-sha256 = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925"

[package.metadata.docs.rs]
# Toggle on extra features that aren't on by default
features = ["metadata"]

# The library keeps its upstream name, so `use syntect::...` in the fork's own
# tests, examples and doctests is unchanged. Dependents rename the package:
# `syntect = { package = "diffs-syntect", ... }`.
[lib]
name = "syntect"

[dependencies]
yaml-rust = { version = "0.4.5", optional = true }
onig = { version = "6.5.1", optional = true, default-features = false }
# The patched fork; the dependency keeps the `fancy-regex` name, so the
# `fancy-regex/...` features and `fancy_regex::` paths below resolve to it.
fancy-regex = { package = "diffs-fancy-regex", version = "0.1.0", path = "../diffs-fancy-regex", optional = true }
walkdir = "2.0"
regex-syntax = { version = "0.8", optional = true }
plist = { version = "1.3", optional = true }
bincode = { version = "1.0", optional = true }
flate2 = { version = "1.0", optional = true }
fnv = { version = "1.0", optional = true }
serde = "1.0"
serde_derive = "1.0"
serde_json = { version = "1.0", optional = true }
once_cell = "1.8"
thiserror = "2.0.12"

[dev-dependencies]
rayon = "1.0.0"
regex = "1.0"
getopts = "0.2"
pretty_assertions = "0.6"
serde_json = "1.0"

[features]
shared-engines = ["regex-fancy", "fancy-regex/shared-engines"]
regex-census = ["parsing"]
syntax-timing = ["parsing"]
owner-census = ["regex-census", "regex-fancy", "fancy-regex/owner-census"]

# Dump loading using flate2
dump-load = ["flate2", "bincode"]
# Dump creation using flate2
dump-create = ["flate2", "bincode"]

regex-fancy = ["fancy-regex"]
regex-onig = ["onig"]

parsing = ["regex-syntax", "fnv", "dump-create", "dump-load"]

# Support for .tmPreferenes metadata files (indentation, comment syntax, etc)
metadata = ["parsing", "plist-load", "dep:serde_json"]

# Enables inclusion of the default syntax packages.
default-syntaxes = ["parsing", "dump-load"]
# Enables inclusion of the default theme packages.
default-themes = ["dump-load"]

html = ["parsing"]
# Support for parsing .tmTheme files and .tmPreferences files
plist-load = ["plist", "dep:serde_json"]
# Support for parsing .sublime-syntax files
yaml-load = ["yaml-rust", "parsing"]

default-onig = ["parsing", "default-syntaxes", "default-themes", "html", "plist-load", "yaml-load", "dump-load", "dump-create", "regex-onig"]
# In order to switch to the fancy-regex engine, disable default features then add the default-fancy feature
default-fancy = ["parsing", "default-syntaxes", "default-themes", "html", "plist-load", "yaml-load", "dump-load", "dump-create", "regex-fancy"]
default = ["default-onig"]


# Upstream code keeps upstream's lint state. diffs-rs CI runs clippy with
# `-D warnings`, which would otherwise apply to this workspace member too.
[lints.rust]
mismatched_lifetime_syntaxes = "allow"

[lints.clippy]
all = { level = "allow", priority = -1 }