lang-lib 1.0.0

A lightweight, high-performance localization library for Rust. Loads TOML language files, supports runtime locale switching, configurable paths, and automatic fallback chains.
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 = "2021"
name = "lang-lib"
version = "1.0.0"
authors = ["James Gober <me@jamesgober.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A lightweight, high-performance localization library for Rust. Loads TOML language files, supports runtime locale switching, configurable paths, and automatic fallback chains."
homepage = "https://github.com/jamesgober/lang-lib"
documentation = "https://docs.rs/lang-lib"
readme = "README.md"
keywords = [
    "i18n",
    "localization",
    "translation",
    "lang",
    "internationalization",
]
categories = [
    "localization",
    "rust-patterns",
]
license = "Apache-2.0"
repository = "https://github.com/jamesgober/lang-lib"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = []
web-example-actix = ["dep:actix-web"]
web-example-axum = [
    "dep:axum",
    "dep:tokio",
]

[lib]
name = "lang_lib"
path = "src/lib.rs"

[[example]]
name = "actix_server"
path = "examples/actix_server.rs"
required-features = ["web-example-actix"]

[[example]]
name = "axum_server"
path = "examples/axum_server.rs"
required-features = ["web-example-axum"]

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

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

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

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

[dependencies.actix-web]
version = "4"
optional = true

[dependencies.axum]
version = "0.8"
optional = true

[dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
    "net",
]
optional = true

[dependencies.toml]
version = "0.8"

[dev-dependencies.criterion]
version = "0.5"
features = ["cargo_bench_support"]
default-features = false

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