Skip to main content

Crate ferriki

Crate ferriki 

Source
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§

AssetDigest
A normalized SHA-256 digest; safe to use as a cache filename.
AssetMetadata
Release-pinned integrity information for one payload.
BacktrackingWarning
An advisory finding from a regex scanner that Ferriki has compiled.
DirectoryAssetSource
Reads a digest-addressed directory, such as a pre-populated offline cache.
EmbeddedAssetSource
Borrowed or owned offline payloads, deduplicated by digest.
Error
An owned error with a stable category and human-readable context.
FontStyle
TextMate font style bits. Serializes as its integer value; NOT_SET is -1.
HighlightThemeMetadata
Resolved metadata for a requested theme variant.
HighlightThemeToken
A source segment aligned across all requested themes.
HighlightThemeTokenStyle
Owned style for one named theme variant of a token.
HighlightToken
HighlightTokensResult
HighlightTokensWithThemesResult
Owned tokens and theme metadata for multi-theme highlighting.
HighlightedLines
Escaped, balanced inner HTML and the theme colors for one code block.
Highlighter
Reusable, synchronous highlighter for Rust consumers.
HighlighterBuilder
Configuration for a reusable highlighter.
HtmlWithCss
Class-based HTML and the stylesheet required by its resolved theme.
LanguageRegistration
A typed custom TextMate grammar registration.
RawGrammar
RawTheme
RawThemeSetting
RawThemeStyle
ReleaseAsset
One pinned payload of a ReleaseManifest.
ReleaseManifest
Digest, size and format version of every grammar, bytecode and theme payload.
RenderOptions
StandardAssetCatalogs
ThemeData
TokenizeOptions

Enums§

BacktrackingRisk
The pattern shape Ferroni identified as a possible source of excessive backtracking.
ErrorKind
Stable category of a Rust highlighter failure.
ParseRawGrammarError
RawThemeScope
StandardTokenType
The standard token type of vscode-textmate. Serializes as its numeric value.
StyleMode
Controls how theme styles are emitted.

Traits§

AssetSource
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 .json file 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.