typesayer 0.1.0

Typed structured prediction, prompt adaptation, evaluation, and optimization for language models
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 = "2024"
rust-version = "1.94.1"
name = "typesayer"
version = "0.1.0"
authors = [
    "Thomas Santerre <opensource@moderately.ai>",
    "Moderately AI Inc. <opensource@moderately.ai>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Typed structured prediction, prompt adaptation, evaluation, and optimization for language models"
homepage = "https://github.com/moderately-ai/typesayer"
documentation = "https://docs.rs/typesayer"
readme = "README.md"
keywords = [
    "llm",
    "structured-output",
    "prediction",
    "prompt",
    "optimization",
]
categories = [
    "algorithms",
    "asynchronous",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/moderately-ai/typesayer"

[package.metadata.docs.rs]
all-features = true

[features]
default = []
openai = ["modelplease/openai"]

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

[[example]]
name = "basic_predict"
path = "examples/basic_predict.rs"
required-features = ["openai"]

[[example]]
name = "mipro_optimization"
path = "examples/mipro_optimization.rs"
required-features = ["openai"]

[[example]]
name = "module_and_optimization"
path = "examples/module_and_optimization.rs"
required-features = ["openai"]

[[example]]
name = "structured_extraction"
path = "examples/structured_extraction.rs"
required-features = ["openai"]

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

[dependencies.async-trait]
version = "=0.1.89"

[dependencies.enumset]
version = "=1.1.5"
features = ["serde"]

[dependencies.futures]
version = "=0.3.32"

[dependencies.modelplease]
version = "0.1.0"
default-features = false

[dependencies.once_cell]
version = "=1.21.4"

[dependencies.parzen]
version = "0.1.0"

[dependencies.rand]
version = "=0.9.3"

[dependencies.regex]
version = "=1.12.3"

[dependencies.serde]
version = "=1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "=1.0.149"
features = ["arbitrary_precision"]

[dependencies.thiserror]
version = "=2.0.18"

[dependencies.tokio]
version = "=1.50.0"
features = [
    "fs",
    "io-std",
    "io-util",
    "macros",
    "rt-multi-thread",
    "signal",
    "sync",
    "time",
]

[dependencies.tracing]
version = "=0.1.44"

[dependencies.typesayer-types]
version = "0.1.0"

[dev-dependencies.insta]
version = "=1.43.2"
features = ["json"]

[dev-dependencies.proptest]
version = "1.5"

[dev-dependencies.reqwest]
version = "=0.12.28"
features = [
    "json",
    "rustls-tls",
]
default-features = false

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

[dev-dependencies.typesayer-parser]
version = "0.1.0"
features = ["test-utils"]

[lints.clippy]
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
dbg_macro = "deny"
doc_markdown = "allow"
expect_used = "allow"
future_not_send = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
panic = "allow"
print_stderr = "deny"
print_stdout = "deny"
result_large_err = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
type_complexity = "allow"
unwrap_used = "allow"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.cargo]
level = "allow"
priority = -1

[lints.clippy.nursery]
level = "allow"
priority = -1

[lints.clippy.pedantic]
level = "allow"
priority = -1

[lints.rust]
unsafe_code = "deny"