1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! KQL Language Tools
//!
//! This crate provides Rust bindings to Microsoft's `Kusto.Language` library
//! via .NET AOT compilation. It enables KQL validation, completion, and
//! syntax highlighting in Rust applications.
//!
//! ## Features
//!
//! - **Syntax Validation**: Check KQL queries for syntax errors
//! - **Schema Validation**: Validate queries against a database schema
//! - **Completions**: Get intellisense suggestions at cursor position
//! - **Classification**: Get syntax highlighting spans
//!
//! ## Usage
//!
//! ```no_run
//! use kql_language_tools::{KqlValidator, ValidationResult};
//!
//! fn main() -> Result<(), kql_language_tools::Error> {
//! let validator = KqlValidator::new()?;
//! let result = validator.validate_syntax("SecurityEvent | take 10")?;
//!
//! if result.is_valid() {
//! println!("Query is valid!");
//! } else {
//! for diagnostic in result.diagnostics() {
//! println!("Error at {}:{}: {}", diagnostic.line, diagnostic.column, diagnostic.message);
//! }
//! }
//! Ok(())
//! }
//! ```
//!
//! ## Native Library
//!
//! This crate requires a native library built from the .NET AOT project.
//! The library can be:
//!
//! 1. Built from source: `cd dotnet && dotnet publish -c Release -r <rid>`
//! 2. Downloaded from releases (if using `bundled` feature)
//! 3. Specified via `kql_language_tools_PATH` environment variable
pub use ;
pub use ;
pub use Error;
pub use ;
pub use ;
pub use KqlValidator;
/// Result type alias for this crate
pub type Result<T> = Result;
/// Library version
pub const VERSION: &str = env!;
/// Check if the native library is available
///
/// Returns `true` if the native library can be loaded, `false` otherwise.
/// This is a lightweight check that doesn't fully initialize the library.
/// Get the path to the native library, if found