[package]
edition = "2024"
rust-version = "1.92"
name = "allama"
version = "0.2.0"
build = false
exclude = [
"tests/fixtures/otlp",
"tests/otelcol.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Low-level, provider-agnostic LLM abstractions for Rust"
readme = "README.md"
keywords = [
"llm",
"ai",
"chat",
"embeddings",
"streaming",
]
categories = [
"api-bindings",
"artificial-intelligence",
"asynchronous",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/sagikazarmark/allama"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = ["warning-events"]
derive = ["dep:allama-derive"]
extract = ["schema"]
mock = []
schema = [
"dep:schemars",
"dep:serde_path_to_error",
]
tracing = ["dep:tracing"]
warning-events = ["dep:tracing"]
[lib]
name = "allama"
path = "src/lib.rs"
[[example]]
name = "chat"
path = "examples/chat.rs"
required-features = ["mock"]
[[example]]
name = "decision"
path = "examples/decision.rs"
required-features = [
"mock",
"derive",
]
[[example]]
name = "dyn_provider"
path = "examples/dyn_provider.rs"
[[example]]
name = "embedding"
path = "examples/embedding.rs"
required-features = ["mock"]
[[example]]
name = "exchange_log"
path = "examples/exchange_log.rs"
required-features = ["mock"]
[[example]]
name = "extract"
path = "examples/extract.rs"
required-features = [
"mock",
"extract",
]
[[example]]
name = "extractor"
path = "examples/extractor.rs"
required-features = [
"mock",
"extract",
]
[[example]]
name = "fallback"
path = "examples/fallback.rs"
required-features = ["mock"]
[[example]]
name = "otel"
path = "examples/otel.rs"
required-features = [
"mock",
"tracing",
]
[[example]]
name = "provider_impl"
path = "examples/provider_impl.rs"
[[example]]
name = "retry"
path = "examples/retry.rs"
required-features = ["mock"]
[[example]]
name = "stream"
path = "examples/stream.rs"
required-features = ["mock"]
[[example]]
name = "tool_calling"
path = "examples/tool_calling.rs"
required-features = [
"mock",
"schema",
]
[[example]]
name = "tracing"
path = "examples/tracing.rs"
required-features = [
"mock",
"tracing",
]
[[test]]
name = "embedding_input_grounding"
path = "tests/embedding_input_grounding.rs"
[[test]]
name = "format_contract"
path = "tests/format_contract.rs"
[[test]]
name = "history_validate"
path = "tests/history_validate.rs"
[[test]]
name = "persisted_names"
path = "tests/persisted_names.rs"
[[test]]
name = "retry_budget"
path = "tests/retry_budget.rs"
[[test]]
name = "retry_directive"
path = "tests/retry_directive.rs"
[[test]]
name = "stream_parity"
path = "tests/stream_parity.rs"
[[test]]
name = "text_conversions"
path = "tests/text_conversions.rs"
[[test]]
name = "tracing"
path = "tests/tracing/main.rs"
[[test]]
name = "warning_codes"
path = "tests/warning_codes.rs"
[[test]]
name = "warning_dedupe_full"
path = "tests/warning_dedupe_full.rs"
[[test]]
name = "warning_events"
path = "tests/warning_events.rs"
[[test]]
name = "wrappers_are_clone"
path = "tests/wrappers_are_clone.rs"
[[bench]]
name = "stream_collect"
path = "benches/stream_collect.rs"
harness = false
[dependencies.allama-derive]
version = "=0.2.0"
optional = true
[dependencies.futures-core]
version = "0.3"
[dependencies.futures-timer]
version = "3"
[dependencies.futures-util]
version = "0.3"
[dependencies.schemars]
version = "1.2"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.118"
[dependencies.serde_path_to_error]
version = "0.1"
optional = true
[dependencies.tracing]
version = "0.1"
features = ["std"]
optional = true
default-features = false
[dependencies.web-time]
version = "1"
[dev-dependencies.anyhow]
version = "1"
[dev-dependencies.criterion]
version = "0.8"
[dev-dependencies.opentelemetry]
version = "0.33.1"
features = ["trace"]
default-features = false
[dev-dependencies.opentelemetry_sdk]
version = "0.33.1"
features = [
"testing",
"trace",
]
default-features = false
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
"time",
]
[dev-dependencies.tracing-opentelemetry]
version = "0.34"
default-features = false
[dev-dependencies.tracing-subscriber]
version = "0.3"
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.futures-timer]
version = "3"
features = ["wasm-bindgen"]
[lints.clippy]
all = "warn"
[lints.rust]
missing_debug_implementations = "warn"