[package]
edition = "2024"
rust-version = "1.85"
name = "md-tmpl"
version = "0.4.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Lightweight template engine for .tmpl.md prompt files with typed frontmatter"
readme = "README.md"
keywords = [
"template",
"prompt",
"markdown",
"llm",
"agent",
]
categories = [
"template-engine",
"text-processing",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/domenukk/md-tmpl"
[features]
default = [
"std",
"serde",
"typed-builder",
]
serde = [
"dep:serde",
"dep:ciborium",
"hashbrown/serde",
]
std = [
"hashbrown/default",
"thiserror/std",
"ciborium/std",
"dep:flexbuffers",
]
typed-builder = ["dep:typed-builder"]
[lib]
name = "md_tmpl"
path = "src/lib.rs"
[[test]]
name = "adv_m1_tests"
path = "tests/adv_m1_tests.rs"
required-features = ["std"]
[[test]]
name = "no_std_compat"
path = "tests/no_std_compat.rs"
[[test]]
name = "yaml_conformance"
path = "tests/yaml_conformance.rs"
required-features = ["std"]
[[test]]
name = "yaml_cross_validation"
path = "tests/yaml_cross_validation.rs"
[[bench]]
name = "template_bench"
path = "benches/template_bench.rs"
harness = false
required-features = ["std"]
[dependencies.ciborium]
version = "0.2.2"
optional = true
default-features = false
[dependencies.const-str]
version = "1.1"
[dependencies.flexbuffers]
version = "25.12"
optional = true
[dependencies.hashbrown]
version = "0.17"
features = [
"allocator-api2",
"default-hasher",
]
default-features = false
[dependencies.itoa]
version = "1"
default-features = false
[dependencies.serde]
version = "1"
features = [
"derive",
"alloc",
]
optional = true
default-features = false
[dependencies.spin]
version = "0.12"
features = ["lazy"]
default-features = false
[dependencies.thiserror]
version = "2"
default-features = false
[dependencies.typed-builder]
version = "0.23"
optional = true
[dev-dependencies.criterion]
version = "0.7"
features = ["html_reports"]
[dev-dependencies.flexbuffers]
version = "25.12"
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_yaml]
version = "0.9"
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.typed-builder]
version = "0.23"
[lints.clippy]
implicit_hasher = "allow"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.pedantic]
level = "deny"
priority = -1
[lints.rust]
warnings = "deny"