dbt-antlr-codegen
Rust library and dbt-antlr-codegen command for compiling ANTLR v4 grammars
into Rust source compatible with dbt-antlr-runtime.
Use it from a build script:
[]
= "0.1"
[]
= { = "0.1", = false, = ["generator"] }
Config writes the generated files to OUT_DIR by default and prints
cargo:rerun-if-changed directives covering the grammars and their import
search directories. Wrap the generated files with include! inside a module
carrying #![allow(clippy::all, warnings)]. default-features = false
skips the fancy diagnostics rendering used by the command-line tool and
noticeably shrinks the build-dependency tree.
Pinned-binary mode
If compiling the generator itself is too expensive for your build pipeline,
skip the generator feature and download a pinned release binary instead:
[]
= { = "0.1", = false, = ["download"] }
This downloads the dbt-antlr-codegen binary for the build host from the
GitHub release dbt-antlr-codegen-v0.1.0, verifies its SHA-256 checksum
(optionally pinned further with pinned_release_sha256), caches it under
OUT_DIR, and invokes it. Requires curl on PATH.
Prebuilt binaries are currently published for 0.1.0 only; later releases
ship crates.io-only until binary distribution is re-enabled (see RELEASE.md).
Or install the command: