pub const API_INDEX: &[(&str, ApiKind, Option<&str>)] = &[
("byte_scan_dispatch_config", ApiKind::Function, None),
("candidate_start_dispatch_config", ApiKind::Function, None),
("haystack_len_u32", ApiKind::Function, None),
("pack_haystack_u32", ApiKind::Function, None),
("pack_u32_slice", ApiKind::Function, None),
("scan_guard", ApiKind::Function, None),
("u32_words_as_le_bytes", ApiKind::Function, None),
("unpack_match_triples", ApiKind::Function, None),
("DEFAULT_MAX_SCAN_BYTES", ApiKind::Const, None),
("MatchScan", ApiKind::Trait, None),
("MatchEngineCache", ApiKind::Trait, None),
("ScanResult", ApiKind::Struct, None),
("cached_load_or_compile", ApiKind::Function, None),
("engine_cache_path", ApiKind::Function, None),
("compact_hits", ApiKind::Function, None),
("compact_hits_with_layout", ApiKind::Function, None),
("emit_hit", ApiKind::Function, None),
("emit_hit_then_compact", ApiKind::Function, None),
("emit_hit_then_compact_with_layout", ApiKind::Function, None),
("emit_hit_with_layout", ApiKind::Function, None),
("HIT_BUFFER_LIVE_LENGTH", ApiKind::Const, None),
("HIT_BUFFER_OVERFLOW_COUNT", ApiKind::Const, None),
("GpuLiteralSet", ApiKind::Struct, None),
("LiteralMatch", ApiKind::TypeAlias, None),
("LiteralSetPreparedCount", ApiKind::Struct, None),
("LiteralSetPreparedScan", ApiKind::Struct, None),
("LiteralSetScanScratch", ApiKind::Struct, None),
("LiteralSetWireError", ApiKind::Enum, None),
("LITERAL_SET_COUNT_RESOURCE_INDEX", ApiKind::Const, None),
(
"LITERAL_SET_COUNT_RESET_RESOURCE_INDICES",
ApiKind::Const,
None,
),
(
"LITERAL_SET_COUNT_SCAN_RESOURCE_INDICES",
ApiKind::Const,
None,
),
(
"LITERAL_SET_MATCH_COUNT_RESOURCE_INDEX",
ApiKind::Const,
None,
),
("LITERAL_SET_MATCHES_RESOURCE_INDEX", ApiKind::Const, None),
("LITERAL_SET_RESET_RESOURCE_INDICES", ApiKind::Const, None),
("LITERAL_SET_SCAN_RESOURCE_INDICES", ApiKind::Const, None),
("fuse_programs", ApiKind::Function, None),
("fuse_programs_vec", ApiKind::Function, None),
("FusionError", ApiKind::Enum, None),
(
"substring_search",
ApiKind::Function,
Some("matching-substring"),
),
("aho_corasick", ApiKind::Function, Some("matching-dfa")),
("dfa_compile", ApiKind::Function, Some("matching-dfa")),
(
"dfa_compile_with_budget",
ApiKind::Function,
Some("matching-dfa"),
),
("CompiledDfa", ApiKind::Struct, Some("matching-dfa")),
("DfaCompileError", ApiKind::Enum, Some("matching-dfa")),
(
"DEFAULT_DFA_BUDGET_BYTES",
ApiKind::Const,
Some("matching-dfa"),
),
("DirectGpuScanner", ApiKind::Struct, Some("matching-dfa")),
(
"build_rule_pipeline",
ApiKind::Function,
Some("matching-nfa"),
),
("PipelineWireError", ApiKind::Enum, Some("matching-nfa")),
("RulePipeline", ApiKind::Struct, Some("matching-nfa")),
(
"build_rule_pipeline_from_regex",
ApiKind::Function,
Some("matching-regex"),
),
(
"compile_regex_set",
ApiKind::Function,
Some("matching-regex"),
),
("CompiledRegexSet", ApiKind::Struct, Some("matching-regex")),
("RegexCompileError", ApiKind::Enum, Some("matching-regex")),
(
"build_regex_dfa_pipeline",
ApiKind::Function,
Some("matching-regex"),
),
(
"build_regex_dfa_unanchored",
ApiKind::Function,
Some("matching-regex"),
),
("RegexDfaPipeline", ApiKind::Struct, Some("matching-regex")),
("RegexDfaError", ApiKind::Enum, Some("matching-regex")),
];
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ApiKind {
Function,
Struct,
Enum,
Trait,
Const,
TypeAlias,
}
pub mod builders;
pub mod hit_buffer;
pub mod dispatch_io;
pub mod engine;
pub use dispatch_io::{
byte_scan_dispatch_config, candidate_start_dispatch_config, haystack_len_u32,
pack_haystack_u32, pack_u32_slice, scan_guard, u32_words_as_le_bytes, unpack_match_triples,
DEFAULT_MAX_SCAN_BYTES,
};
pub use engine::{
cache_path as engine_cache_path, cached_load_or_compile, MatchEngineCache, MatchScan,
ScanResult,
};
#[cfg(feature = "matching-substring")]
pub mod substring;
#[cfg(feature = "matching-dfa")]
pub mod dfa;
#[cfg(feature = "matching-dfa")]
pub mod classic_ac;
#[cfg(feature = "matching-nfa")]
pub mod nfa;
pub mod literal_set;
pub mod post_process;
pub mod pipeline;
#[cfg(any(test, feature = "test-fixtures"))]
pub mod test_fixtures;
#[cfg(feature = "matching-dfa")]
pub mod direct_gpu;
#[cfg(feature = "matching-nfa")]
pub mod mega_scan;
#[cfg(feature = "matching-nfa")]
pub mod resident;
#[cfg(feature = "matching-regex")]
pub mod regex_compile;
#[cfg(all(feature = "matching-regex", feature = "matching-dfa"))]
pub mod regex_dfa;
#[cfg(feature = "matching-dfa")]
pub use dfa::{
aho_corasick, dfa_compile, dfa_compile_with_budget, CompiledDfa, DfaCompileError,
DEFAULT_DFA_BUDGET_BYTES,
};
#[cfg(feature = "matching-dfa")]
pub use direct_gpu::DirectGpuScanner;
pub use hit_buffer::{
compact_hits, compact_hits_with_layout, emit_hit, emit_hit_then_compact,
emit_hit_then_compact_with_layout, emit_hit_with_layout, HIT_BUFFER_LIVE_LENGTH,
HIT_BUFFER_OVERFLOW_COUNT,
};
pub use literal_set::{
GpuLiteralSet, LiteralSetPreparedCount, LiteralSetPreparedScan, LiteralSetScanScratch,
LiteralSetWireError, Match as LiteralMatch, LITERAL_SET_COUNT_RESET_RESOURCE_INDICES,
LITERAL_SET_COUNT_RESOURCE_INDEX, LITERAL_SET_COUNT_SCAN_RESOURCE_INDICES,
LITERAL_SET_MATCHES_RESOURCE_INDEX, LITERAL_SET_MATCH_COUNT_RESOURCE_INDEX,
LITERAL_SET_RESET_RESOURCE_INDICES, LITERAL_SET_SCAN_RESOURCE_INDICES,
};
#[cfg(feature = "matching-nfa")]
pub use mega_scan::{build as build_rule_pipeline, PipelineWireError, RulePipeline};
pub use pipeline::{Pipeline, PostProcessFn};
#[cfg(any(test, feature = "cpu-parity"))]
pub use post_process::{
reference_post_process, shannon_entropy_bits_per_byte, try_reference_post_process,
try_reference_post_process_into,
};
pub use post_process::{PostProcessError, PostProcessedMatch};
#[cfg(feature = "matching-regex")]
pub use regex_compile::{
build_rule_pipeline_from_regex, compile_regex_set, CompiledRegexSet, RegexCompileError,
};
#[cfg(all(feature = "matching-regex", feature = "matching-dfa"))]
pub use regex_dfa::{
build_regex_dfa_pipeline, build_regex_dfa_unanchored, RegexDfaError, RegexDfaPipeline,
};
#[cfg(feature = "matching-nfa")]
pub use resident::ResidentRulePipeline;
#[cfg(feature = "matching-substring")]
pub use substring::{substring_search, SCAN_SUBSTRING_OP_ID};
pub use vyre_foundation::execution_plan::fusion::{fuse_programs, fuse_programs_vec, FusionError};
#[cfg(feature = "cpu-parity")]
use vyre_primitives::matching::region::dedup_regions_cpu as primitive_dedup_regions_cpu;
#[cfg(any(test, feature = "cpu-parity"))]
pub use vyre_primitives::matching::region::dedup_regions_inplace;
pub use vyre_primitives::matching::region::{dedup_regions_flag_program, RegionTriple};
#[cfg(feature = "cpu-parity")]
#[must_use]
pub fn dedup_regions_reference(input: Vec<RegionTriple>) -> Vec<RegionTriple> {
primitive_dedup_regions_cpu(input)
}