:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
[package]
name = "hogql_parser_rs"
# Versioned independently from the cpp parser in `common/hogql_parser/setup.py`. Both started from the same HogQL grammar revision, but the Rust port is bumped on its own whenever the hand-rolled parser changes; each ships as its own PyPI wheel.
version = "1.3.110"
edition = "2021"
publish = false
[lib]
name = "hogql_parser_rs"
# `cdylib` for the Python wheel that maturin builds; `rlib` so other Rust
# crates in the workspace can depend on the parser as a library if useful
# later. `cdylib` alone would break that.
crate-type = ["cdylib", "rlib"]
[lints]
workspace = true
[dependencies]
serde_json.workspace = true
# `abi3-py312` lets one wheel work on every Python 3.12+ via the stable
# CPython ABI — avoids shipping a separate wheel per minor Python.
# 0.28: cargo allows one pyo3 version per workspace (pyo3 has `links = "python"`),
# and rust/deltalite/python's pyarrow ingest (arrow 58 `pyarrow` feature) requires
# 0.28 — keep the two in lockstep or the workspace stops resolving.
pyo3 = { version = "0.28", features = ["extension-module", "abi3-py312"] }
[features]
default = []
# Compile the SanitizerCoverage `__sanitizer_cov_trace_pc_*` callbacks in
# `src/cov.rs` and expose `cov_snapshot()` / `cov_reset()` to Python. The
# actual edge-coverage instrumentation pass is requested via RUSTFLAGS in
# the same build:
# RUSTFLAGS="-C passes=sancov-module \
# -C llvm-args=-sanitizer-coverage-level=3 \
# -C llvm-args=-sanitizer-coverage-trace-pc-guard" \
# maturin develop --release --features coverage
# Production wheels never set this; the resulting wheel is the parser-parity
# grind's coverage-instrumented variant. See the "Coverage-instrumented build"
# section of `rust/hogql/parser/README.md`.
coverage = []