bevy_markup 0.2.0

HTML templates (Tera), CSS and Fluent localization as native Bevy UI
Documentation
[package]
name = "bevy_markup"
version = "0.2.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "HTML templates (Tera), CSS and Fluent localization as native Bevy UI"
repository = "https://github.com/nchashch/bevy_markup"
readme = "README.md"
keywords = ["bevy", "ui", "html", "css", "localization"]
categories = ["game-development", "gui", "internationalization"]
# Developer-only material; not needed to use the crate.
exclude = [".github/", "docs/agents/", "scripts/", "tests/golden/", "AGENTS.md"]

[features]
# Parley falls back to installed system fonts per script (e.g. CJK, which the
# bundled fonts lack). An app decision, so opt-in.
system_fonts = ["bevy/system_font_discovery"]
# Exposes `bevy_markup::fuzz` (`#[doc(hidden)]`, not covered by semver): internal
# glue callable without a full Bevy app, for `fuzz/` targets.
fuzzing = ["dep:wgpu-types", "dep:unic-langid"]
unic-langid = ["dep:unic-langid"]

[dependencies]
# Only what the library's code uses; the app picks rendering, windowing,
# platform and everything else. Check with `cargo check --lib`.
bevy = { version = "0.19.1", default-features = false, features = [
	# Node, ImageNode, Text/TextSpan (bevy_ui + bevy_text), assets, ECS.
	"ui_api",
	# Fallback when the CSS names no registered font family.
	"default_font",
	"bevy_log",
] }
# 9-slice style manifests (*.slice.ron).
ron = "0.12.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# HTML: Tera templating, then tl parsing.
tera = { version = "2.4.0", features = ["fast"] }
tl = "0.7.8"
# Localization; `fluent` must match bevy_fluent's version.
bevy_fluent = "0.15"
fluent = "0.16.0"
# CSS. `into_owned`: parsed StyleSheet<'i> → StyleSheet<'static> for storing as an asset.
lightningcss = { version = "1.0.0-alpha.72", features = ["into_owned"] }
# Only for the `fuzzing` harness: `Image::new_fill` needs wgpu texture types,
# which bevy_image does not re-export.
wgpu-types = { version = "29.0.3", optional = true }
unic-langid = { version = "0.9", optional = true }

[dev-dependencies]
arbtest = "0.3.2"
async-trait = "0.1.92"
# Examples are full apps: Bevy defaults (window, renderer, …) plus system
# font fallback so the demo's Japanese locale renders.
bevy = { version = "0.19.1", features = ["system_font_discovery"] }
# FTL AST for tests/content_lint.rs (message ids, pseudo-locale); fluent
# doesn't re-export it. Same version as fluent's, patched below.
fluent-syntax = "0.11.1"
# Pinned: proptest-stateful 0.1.3 needs the rand-0.8 TestRng of proptest
# ≤1.5, so every proptest-based dev crate must share that line.
proptest = "=1.5.0"
proptest-stateful = "0.1.3"
quickcheck = "1.1.0"
quickcheck_macros = "1.2.0"
# 0.4 requires proptest ≥1.6; 0.3.1 is the last line on ^1.1.
test-strategy = "0.3.1"

# fluent-syntax from the fork with fixes for two bugs reachable from any FTL
# asset (docs/agents/bugs/UPSTREAM.md U1, U2): a panic on an invalid unicode
# escape before a multi-byte character, and a stack overflow on deeply nested
# expressions. Branch fix/fuzzing-bugs-0.11 is upstream's fluent-syntax 0.11.1
# tag plus the fixes; 0.11 is what bevy_fluent 0.15's fluent-bundle requires.
# Cargo.lock pins the commit. Applies only inside this repository: crates
# depending on bevy_markup need the same entry (see README). The fuzz
# workspaces repeat it.
[patch.crates-io]
fluent-syntax = { git = "https://github.com/nchashch/fluent-rs", branch = "fix/fuzzing-bugs-0.11" }

# Mutation testing (scripts/mutants.sh, .github/workflows/mutants.yml).
# Every mutant rebuilds bevy_markup and relinks its test binaries: no debug info
# (it dominates Bevy link times) and optimized dependencies (faster tests;
# built once per target dir). Those runs also link Bevy dynamically
# (`--features bevy/dynamic_linking`) and build only the tests they run —
# measured ~35× faster per mutant than a default `cargo test --no-run`.
[profile.mutants]
inherits = "dev"
debug = false

[profile.mutants.package."*"]
opt-level = 3