sigil-parser 0.3.0

Parser and native compiler for the Sigil programming language - a language that tracks data trust at the type level
Documentation
[package]
name = "sigil-parser"
version = "0.3.0"
edition = "2021"
description = "Parser and native compiler for the Sigil programming language - a language that tracks data trust at the type level"
authors = ["Lilith Crook <lilith@daemoniorum.com>"]
license = "MIT"
repository = "https://github.com/Daemoniorum-LLC/sigil-lang"
homepage = "https://sigil-lang.com"
documentation = "https://sigil-lang.com/pages/docs.html"
readme = "README.md"
keywords = ["parser", "compiler", "programming-language", "jit", "ai"]
categories = ["compilers", "development-tools"]

[features]
default = ["jit"]
jit = ["cranelift-codegen", "cranelift-frontend", "cranelift-jit", "cranelift-module", "cranelift-native"]
llvm = ["inkwell"]
wasm = ["wasm-encoder"]
lsp = ["tower-lsp", "tokio"]

# Protocol support features
protocols = ["protocol-core", "grpc", "http-client", "websocket", "kafka", "amqp", "graphql"]
protocol-core = ["tokio", "url", "async-trait", "futures-util", "tower"]
grpc = ["protocol-core", "tonic", "prost", "prost-types"]
http-client = ["protocol-core", "reqwest", "hyper", "hyper-util", "http", "http-body-util"]
websocket = ["protocol-core", "tokio-tungstenite", "tungstenite"]
kafka = ["protocol-core", "rdkafka"]
amqp = ["protocol-core", "lapin"]
graphql = ["protocol-core", "graphql_client"]

[dependencies]
thiserror = "1.0"
unicode-xid = "0.2"
logos = "0.14"
rustyline = { version = "14.0", features = ["derive"] }

# Rich error reporting
ariadne = "0.4"
strsim = "0.11"  # String similarity (Levenshtein, Jaro-Winkler, etc.)

# JSON/TOML output for AI agents and config
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"

# Parallel processing for linter
rayon = "1.10"

# Directory walking for project loading
walkdir = "2.4"

# Text intelligence
whatlang = "0.16"            # Language detection
rust-stemmers = "1.2"        # Stemming (Porter, Snowball)
tiktoken-rs = "0.5"          # OpenAI tokenizer for LLM token counting

# Crypto and encoding - comprehensive cryptography suite
sha2 = "0.10"
sha3 = "0.10"                        # SHA-3/Keccak
blake3 = "1.5"                       # BLAKE3 (fast, secure)
md-5 = "0.10"
base64 = "0.22"
hex = "0.4"                          # Hex encoding

# Authenticated encryption
aes-gcm = "0.10"                     # AES-GCM AEAD
chacha20poly1305 = "0.10"            # ChaCha20-Poly1305 AEAD

# Asymmetric cryptography
ed25519-dalek = { version = "2.1", features = ["rand_core"] }  # Ed25519 signatures
x25519-dalek = { version = "2.0", features = ["static_secrets"] }  # X25519 key exchange

# Key derivation and password hashing
argon2 = "0.5"                       # Argon2 password hashing
hkdf = "0.12"                        # HKDF key derivation
pbkdf2 = { version = "0.12", features = ["simple"] }  # PBKDF2

# Message authentication
hmac = "0.12"

# Secure random
rand = "0.8"
rand_core = "0.6"
getrandom = "0.2"

# Secret sharing (Shamir)
vsss-rs = "4.0"                      # Verifiable Secret Sharing

# Regex support
regex = "1.10"

# Unicode text processing - polycultural support
unicode-normalization = "0.1"
unicode-segmentation = "1.10"
unicode-script = "0.5"           # Script detection (Latin, Arabic, CJK, etc.)
unicode-bidi = "0.3"             # Bidirectional text (RTL/LTR)
unicode-width = "0.1"            # Display width for CJK
# unicode_categories - not needed, using unicode-script instead
deunicode = "1.4"                # Transliteration to ASCII
icu_collator = "1.5"             # Locale-aware collation
icu_locid = "1.5"                # Locale identifiers
icu_casemap = "1.5"              # Case mapping (Turkish İ, etc.)
icu_segmenter = "1.5"            # Sentence/word segmentation

# UUID generation
uuid = { version = "1.10", features = ["v4", "fast-rng"] }

# Cranelift JIT compiler backend
cranelift-codegen = { version = "0.113", optional = true }
cranelift-frontend = { version = "0.113", optional = true }
cranelift-jit = { version = "0.113", optional = true }
cranelift-module = { version = "0.113", optional = true }
cranelift-native = { version = "0.113", optional = true }

# For runtime support
libc = "0.2"
num_cpus = "1.16"
dirs = "5.0"

# LLVM backend for native performance
inkwell = { version = "0.6", features = ["llvm18-1"], optional = true }

# WASM backend for web deployment
wasm-encoder = { version = "0.219", optional = true }

# Protocol support - async runtime and networking
tokio = { version = "1.35", features = ["full"], optional = true }

# gRPC support
tonic = { version = "0.12", optional = true }
prost = { version = "0.13", optional = true }
prost-types = { version = "0.13", optional = true }

# HTTP client support
reqwest = { version = "0.12", features = ["json", "stream", "gzip", "brotli", "multipart", "blocking"], optional = true }
hyper = { version = "1.4", features = ["full"], optional = true }
hyper-util = { version = "0.1", optional = true }
http = { version = "1.1", optional = true }
http-body-util = { version = "0.1", optional = true }

# WebSocket support
tokio-tungstenite = { version = "0.24", features = ["native-tls"], optional = true }
tungstenite = { version = "0.24", features = ["native-tls"], optional = true }
futures-util = { version = "0.3", optional = true }

# Kafka support
rdkafka = { version = "0.36", features = ["tokio"], optional = true }

# Message queue (AMQP/RabbitMQ) support
lapin = { version = "2.5", optional = true }

# GraphQL client support
graphql_client = { version = "0.14", optional = true }

# URL parsing
url = { version = "2.5", optional = true }

# Async traits
async-trait = { version = "0.1", optional = true }

# Tower for middleware
tower = { version = "0.5", optional = true }

# LSP server support
tower-lsp = { version = "0.20", optional = true }

# File watching for linter
notify = "6.1"

# Glob pattern matching for ignore files
globset = "0.4"

# Tree-sitter parsing infrastructure
tree-sitter = "0.20"

# Tree-sitter language grammars (using compatible versions)
tree-sitter-rust = "0.20"
tree-sitter-python = "0.20"
tree-sitter-javascript = "0.20"
tree-sitter-typescript = "0.20"
tree-sitter-go = "0.20"
tree-sitter-c = "0.20"
tree-sitter-cpp = "0.20"
tree-sitter-java = "0.20"
tree-sitter-json = "0.20"
tree-sitter-css = "0.20"
tree-sitter-bash = "0.20"

[dev-dependencies]
pretty_assertions = "1.4"
proptest = "1.4"
wasmparser = "0.219"  # WASM validation for tests

[[bin]]
name = "sigil"
path = "src/main.rs"

[lib]
name = "sigil_parser"
path = "src/lib.rs"