Skip to content

v1.12.0

Choose a tag to compare

@Goldziher Goldziher released this 29 Jun 16:32

Added

  • prefetch: prefetch(&[&str]) downloads (if needed) and loads every requested grammar in one pass, so a parallel workload only parses. Probes real on-disk loadability instead of has_language, fixing a short-circuit where known-but-not-downloaded grammars were skipped.
  • query cache (Rust): get_query(language, QueryKind) -> Result<Option<Arc<Query>>> compiles a bundled .scm query once and caches the Arc<Query> process-wide. Rust-only; bindings keep the raw query-string accessors.
  • indents & folds queries: get_indents_query / get_folds_query expose the bundled indents.scm / folds.scm; QueryKind gains Indents and Folds.

Changed

  • performance: get_language now takes a lock-free fast path for static and already-loaded dynamic grammars; the global load mutex guards only the not-yet-loaded dynamic path.