sqlglot-rust 0.9.24

A SQL parser, optimizer, and transpiler library inspired by Python's sqlglot
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "sqlglot-rust"
version = "0.9.24"
build = false
exclude = [
    "packaging/test/",
    ".dockerignore",
    ".github/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A SQL parser, optimizer, and transpiler library inspired by Python's sqlglot"
homepage = "https://github.com/protegrity/sql-glot-rust"
documentation = "https://github.com/protegrity/sql-glot-rust/blob/master/docs/guide.md"
readme = "README.md"
keywords = [
    "sql",
    "parser",
    "transpiler",
    "ast",
    "database",
]
categories = [
    "parser-implementations",
    "database",
]
license = "MIT"
repository = "https://github.com/protegrity/sql-glot-rust"

[package.metadata.deb]
assets = [
    [
    "target/release/sqlglot",
    "usr/bin/sqlglot",
    "755",
],
    [
    "target/release/libsqlglot_rust.so",
    "usr/lib/libsqlglot_rust.so",
    "644",
],
    [
    "target/release/libsqlglot_rust.a",
    "usr/lib/libsqlglot_rust.a",
    "644",
],
    [
    "target/ffi/include/sqlglot.h",
    "usr/include/sqlglot.h",
    "644",
],
    [
    "README.md",
    "usr/share/doc/sqlglot-rust/README.md",
    "644",
],
    [
    "LICENSE",
    "usr/share/doc/sqlglot-rust/LICENSE",
    "644",
],
]
copyright = "2024-2026 Protegrity"
extended-description = "sqlglot-rust is a SQL parser, optimizer, and transpiler library supporting 30 SQL dialects. This package provides the sqlglot CLI and shared/static C FFI libraries."
maintainer = "Protegrity <engineering@protegrity.com>"
priority = "optional"
section = "database"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/bin/sqlglot"
mode = "0755"
source = "target/release/sqlglot"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/lib64/libsqlglot_rust.so"
mode = "0644"
source = "target/release/libsqlglot_rust.so"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/lib64/libsqlglot_rust.a"
mode = "0644"
source = "target/release/libsqlglot_rust.a"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/include/sqlglot.h"
mode = "0644"
source = "target/ffi/include/sqlglot.h"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/share/doc/sqlglot-rust/README.md"
mode = "0644"
source = "README.md"

[[package.metadata.generate-rpm.assets]]
dest = "/usr/share/doc/sqlglot-rust/LICENSE"
mode = "0644"
source = "LICENSE"

[features]
cli = ["clap"]
default = []

[lib]
name = "sqlglot_rust"
crate-type = [
    "rlib",
    "cdylib",
    "staticlib",
]
path = "src/lib.rs"

[[bin]]
name = "sqlglot"
path = "src/bin/sqlglot.rs"
required-features = ["cli"]

[[example]]
name = "ast_traversal"
path = "examples/ast_traversal.rs"

[[example]]
name = "builder"
path = "examples/builder.rs"

[[example]]
name = "comments"
path = "examples/comments.rs"

[[example]]
name = "diff"
path = "examples/diff.rs"

[[example]]
name = "executor"
path = "examples/executor.rs"

[[example]]
name = "parse_and_generate"
path = "examples/parse_and_generate.rs"

[[example]]
name = "transpile"
path = "examples/transpile.rs"

[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"

[[test]]
name = "test_cli"
path = "tests/test_cli.rs"

[[test]]
name = "test_comments"
path = "tests/test_comments.rs"

[[test]]
name = "test_dialects"
path = "tests/test_dialects.rs"

[[test]]
name = "test_executor"
path = "tests/test_executor.rs"

[[test]]
name = "test_expressions"
path = "tests/test_expressions.rs"

[[test]]
name = "test_optimizer"
path = "tests/test_optimizer.rs"

[[test]]
name = "test_plugin"
path = "tests/test_plugin.rs"

[[test]]
name = "test_transpile"
path = "tests/test_transpile.rs"

[[bench]]
name = "parser_bench"
path = "benches/parser_bench.rs"
harness = false

[dependencies.clap]
version = "4"
features = ["derive"]
optional = true

[dependencies.log]
version = "0.4"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2"

[dev-dependencies.assert_cmd]
version = "2"

[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]

[dev-dependencies.predicates]
version = "3"

[dev-dependencies.pretty_assertions]
version = "1"

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.tempfile]
version = "3"