Expand description
Reusable, synchronous Ferriki highlighter for Rust applications.
The library has no Node.js or N-API dependency. Asset catalogs are loaded explicitly and cached for reuse across code blocks and documents.
Structs§
- Asset
Digest - A normalized SHA-256 digest; safe to use as a cache filename.
- Asset
Metadata - Release-pinned integrity information for one payload.
- Backtracking
Warning - An advisory finding from a regex scanner that Ferriki has compiled.
- Directory
Asset Source - Reads a digest-addressed directory, such as a pre-populated offline cache.
- Embedded
Asset Source - Borrowed or owned offline payloads, deduplicated by digest.
- Error
- An owned error with a stable category and human-readable context.
- Font
Style - TextMate font style bits. Serializes as its integer value;
NOT_SETis-1. - Highlight
Theme Metadata - Resolved metadata for a requested theme variant.
- Highlight
Theme Token - A source segment aligned across all requested themes.
- Highlight
Theme Token Style - Owned style for one named theme variant of a token.
- Highlight
Token - Highlight
Tokens Result - Highlight
Tokens With Themes Result - Owned tokens and theme metadata for multi-theme highlighting.
- Highlighted
Lines - Escaped, balanced inner HTML and the theme colors for one code block.
- Highlighter
- Reusable, synchronous highlighter for Rust consumers.
- Highlighter
Builder - Configuration for a reusable highlighter.
- Html
With Css - Class-based HTML and the stylesheet required by its resolved theme.
- Language
Registration - A typed custom TextMate grammar registration.
- RawGrammar
- RawTheme
- RawTheme
Setting - RawTheme
Style - Release
Asset - One pinned payload of a
ReleaseManifest. - Release
Manifest - Digest, size and format version of every grammar, bytecode and theme payload.
- Render
Options - Standard
Asset Catalogs - Theme
Data - Tokenize
Options
Enums§
- Backtracking
Risk - The pattern shape Ferroni identified as a possible source of excessive backtracking.
- Error
Kind - Stable category of a Rust highlighter failure.
- Parse
RawGrammar Error - RawTheme
Scope - Standard
Token Type - The standard token type of vscode-textmate. Serializes as its numeric value.
- Style
Mode - Controls how theme styles are emitted.
Traits§
- Asset
Source - Supplies immutable asset bytes by digest. Sources may perform synchronous I/O while explicitly loading assets; they must not implement retries here. Catalogs verify returned bytes before decoding or retaining them.
Functions§
- parse_
raw_ grammar - Parse a TextMate grammar, selecting JSON only for
.jsonfile names. - parse_
theme_ data - render_
hast - Renders a HAST tree, with styles extracted to classes when requested.
- render_
html - render_
html_ lines - Renders trusted, tag-balanced HTML fragments for each highlighted line.
- render_
html_ with_ css - Renders class-based HTML with CSS for this block. Combine CSS from every block. Existing TextMate themes are resolved during tokenization and need no conversion.
Type Aliases§
- Result
- Result returned by the native Ferriki runtime.