[package]
edition = "2024"
rust-version = "1.88"
name = "mf2"
version = "1.0.0"
build = false
exclude = ["package.txt"]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Unicode MessageFormat 2 for Leptos: the one crate an application names — re-exports of the mf2-two crates and their feature flags, and compile_str for ad-hoc messages."
documentation = "https://docs.rs/mf2"
readme = "README.md"
keywords = [
"messageformat",
"mf2",
"i18n",
"l10n",
"leptos",
]
categories = [
"internationalization",
"localization",
"wasm",
"web-programming",
]
license = "MIT"
[package.metadata.docs.rs]
features = [
"compile",
"fn-number",
"datetime-icu",
"host-std",
"ssr",
"static-locale",
"mark-fallback-lang",
"leptos-mf2/leptos-0-9",
]
targets = ["x86_64-unknown-linux-gnu"]
[features]
compile = [
"dep:mf2-syntax",
"dep:mf2-locale-data",
"mf2-catalog/writer",
]
csr = [
"leptos",
"leptos-mf2/csr",
]
datetime-icu = [
"fn-datetime",
"mf2-fn-datetime/datetime-icu",
"mf2-host-web?/time-zones",
"mf2-locale-data?/icu-blob",
]
datetime-intl = [
"fn-datetime",
"mf2-fn-datetime/datetime-intl",
"mf2-host-web?/datetime-intl",
]
default = []
fn-datetime = [
"dep:mf2-fn-datetime",
"leptos-mf2/fn-datetime",
]
fn-number = ["dep:mf2-fn-number"]
host-std = ["dep:mf2-host-std"]
host-web = ["dep:mf2-host-web"]
hydrate = [
"leptos",
"leptos-mf2/hydrate",
]
intl = [
"mf2-runtime/intl",
"mf2-fn-number?/intl",
"mf2-host-web?/intl",
]
leptos = ["leptos-mf2/leptos"]
mark-fallback-lang = ["leptos-mf2/mark-fallback-lang"]
ssr = [
"leptos",
"leptos-mf2/ssr",
]
static-locale = ["leptos-mf2/static-locale"]
[lib]
name = "mf2"
path = "src/lib.rs"
[[test]]
name = "call_site"
path = "tests/call_site.rs"
required-features = [
"compile",
"host-std",
"fn-datetime",
]
[dependencies.leptos-mf2]
version = "=1.0.0"
default-features = false
[dependencies.mf2-catalog]
version = "=1.0.0"
[dependencies.mf2-fn-datetime]
version = "=1.0.0"
optional = true
[dependencies.mf2-fn-number]
version = "=1.0.0"
optional = true
[dependencies.mf2-host-std]
version = "=1.0.0"
optional = true
[dependencies.mf2-host-web]
version = "=1.0.0"
optional = true
[dependencies.mf2-locale-data]
version = "=1.0.0"
optional = true
[dependencies.mf2-macros]
version = "=1.0.0"
[dependencies.mf2-model]
version = "=1.0.0"
[dependencies.mf2-runtime]
version = "=1.0.0"
[dependencies.mf2-syntax]
version = "=1.0.0"
optional = true
[dependencies.thiserror]
version = "2.0.20"
default-features = false
[lints.clippy]
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
similar_names = "allow"
too_many_lines = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "allow"
unreachable_pub = "warn"
unsafe_code = "deny"