polydat 0.4.0

Polydat — a variates construction engine
Documentation
# Copyright 2024-2026 Jonathan Shook
# SPDX-License-Identifier: Apache-2.0
#
# `polydat` — the facade: the runtime (`polydat-core`), the node
# library (`polydat-nodes`), and the language (`polydat-grammar`),
# each re-exported at the paths it always had, plus the `polydat`
# binary. Programs, tests, benches, and examples link this crate.

[package]
name = "polydat"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Polydat — a variates construction engine"
keywords = ["nosqlbench", "workload", "benchmark", "data-generation"]
categories = ["command-line-utilities", "simulation"]
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/polydat"
# The crate's own README ships in the package; the workspace-root
# README describes the whole repository.
readme = "README.md"
# The integration tests are one binary, tests/suite.rs, with every
# file under tests/ as a module (one link against the library, not
# one per file); see the suite root for how a test is addressed.
autotests = false

# Exclude bench-output artifacts and large perf-test fixtures from
# the published package. The benches themselves (`benches/`) stay —
# they're part of the public surface — but their generated graphs
# under `tests/bench_graphs/` and the per-test perf fixtures under
# `tests/perf_tests/` are noise for downstream consumers.
exclude = [
    "tests/bench_graphs/**",
    "tests/perf_tests/**",
]

[dependencies]
# The facade: the runtime, the node library, and the language, each
# re-exported at the paths it always had. The binary and every test,
# bench, and example link this crate.
polydat-core.workspace = true
polydat-nodes.workspace = true
polydat-grammar.workspace = true
# Command-line harness (`polydat` binary). Optional so library
# consumers who disable default features do not pull it in.
clap = { version = "4", features = ["derive"], optional = true }
# The binary's JSON output.
serde_json = { version = "1", features = ["preserve_order"] }
# `polydat perf` reads its suite from TOML and writes results as JSON.
serde = { version = "1", features = ["derive"], optional = true }
toml = { version = "0.8", optional = true }

[features]
default = ["jit", "cli"]
cli = ["dep:clap", "dep:serde", "dep:toml"]
vectordata = ["polydat-core/vectordata"]
jit = ["polydat-core/jit", "polydat-nodes/jit"]
# Passthrough for the typed tier constructors; see polydat-core.
bench-tiers = ["polydat-core/bench-tiers"]

# docs.rs builds with every feature so the native tier and the
# optional integrations are documented.
[package.metadata.docs.rs]
all-features = true

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
# Work-stealing parallelism for tests with uneven per-case cost
# (the §9.2 equivalence harness sweeps random ASTs whose dispense
# time varies widely; rayon's stealing scheduler keeps every core
# fed where fixed chunking leaves stragglers).
rayon = "1"
xxhash-rust = { version = "0.8", features = ["xxh3"] }
half = "2"
inventory = "0.3.24"
trybuild = "1.0.121"

[lib]
# The suite runs under nextest, which runs no doctests; the rustdoc
# examples are mirrored in tests/rustdoc_examples.rs and the
# compile-fail seal in tests/ui/seal.
doctest = false

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

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

# Each of these defines nodes of its own and so stays a binary of its
# own: a node registers at link time, and the suite's registry-walking
# tests must see the library alone.
[[test]]
name = "ext_tiers"
path = "tests/ext_tiers.rs"

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

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

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

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

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

[[bench]]
name = "polydat_throughput"
harness = false

[[bench]]
name = "cell_throughput"
harness = false

[[bench]]
name = "simd_autopromotion"
harness = false
required-features = ["jit"]

[[bench]]
name = "engine_ladder"
harness = false
required-features = ["bench-tiers"]

[[bench]]
name = "tile_render"
harness = false

# These examples drive the native tier directly, so they need the JIT.
[[example]]
name = "polytile_tutorial"
required-features = ["jit"]

[[example]]
name = "embedding_guide"
required-features = ["jit"]