# 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"
rust-version = "1.75"
name = "telltale"
version = "4.0.0"
authors = [
    "Zak Cutner <me@zakcutner.uk>",
    "Sam Hart <sam@hxrts.com>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Session types for multi-party asynchronous communication."
readme = "README.md"
keywords = [
    "async",
    "deadlock",
    "safety",
    "session",
    "types",
]
categories = [
    "asynchronous",
    "concurrency",
]
license = "MIT"
repository = "https://github.com/hxrts/telltale"

[features]
default = []
full = [
    "theory",
    "theory-async-subtyping",
    "theory-bounded",
]
test-utils = ["rand"]
theory = ["telltale-theory"]
theory-async-subtyping = [
    "theory",
    "telltale-theory/async-subtyping",
]
theory-bounded = [
    "theory",
    "telltale-theory/bounded",
]
wasm = ["getrandom/js"]

[lib]
name = "telltale"
path = "rust/src/lib.rs"
bench = false

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

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

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

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

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

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

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

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

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

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

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

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

[[test]]
name = "message_tests"
path = "rust/tests/message_tests.rs"

[[test]]
name = "role_tests"
path = "rust/tests/role_tests.rs"

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

[[test]]
name = "seal_tests"
path = "rust/tests/seal_tests.rs"

[[test]]
name = "session_tests"
path = "rust/tests/session_tests.rs"

[dependencies.anyhow]
version = "1.0"

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

[dependencies.base64]
version = "0.21"

[dependencies.futures]
version = "0.3"

[dependencies.hex]
version = "0.4"

[dependencies.serde]
version = "1.0"
features = [
    "derive",
    "derive",
]

[dependencies.telltale-macros]
version = "4.0.0"

[dependencies.telltale-theory]
version = "4.0.0"
optional = true

[dependencies.telltale-types]
version = "4.0.0"

[dependencies.thiserror]
version = "1.0"

[dependencies.time]
version = "0.3"
features = ["serde"]

[dev-dependencies.anyhow]
version = "1.0"

[dev-dependencies.criterion]
version = "0.3"
features = ["html_reports"]

[dev-dependencies.futures]
version = "0.3"
features = ["thread-pool"]

[dev-dependencies.num-complex]
version = "0.4"

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

[dev-dependencies.rand]
version = "0.8"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.telltale-theory]
version = "4.0.0"

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

[dev-dependencies.tokio]
version = "1.35"
features = [
    "full",
    "macros",
    "rt",
    "time",
]

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.35"
features = ["full"]

[target.'cfg(target_arch = "wasm32")'.dependencies.bincode]
version = "1.3"

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2"
features = ["js"]

[target.'cfg(target_arch = "wasm32")'.dependencies.proc-macro2]
version = "1.0"

[target.'cfg(target_arch = "wasm32")'.dependencies.quote]
version = "1.0"

[target.'cfg(target_arch = "wasm32")'.dependencies.rand]
version = "0.8"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.serde]
version = "1.0"
features = [
    "derive",
    "derive",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.syn]
version = "2.0"
features = [
    "full",
    "extra-traits",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.tracing]
version = "0.1"

[target.'cfg(target_arch = "wasm32")'.dependencies.uuid]
version = "1.6"
features = [
    "v4",
    "serde",
    "js",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-timer]
version = "0.2"

[lints.clippy]
as_conversions = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_sign_loss = "warn"
cognitive_complexity = "warn"
fn_params_excessive_bools = "warn"
inefficient_to_string = "warn"
large_stack_arrays = "warn"
let_underscore_must_use = "deny"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
missing_safety_doc = "deny"
module_name_repetitions = "allow"
must_use_candidate = "warn"
needless_collect = "warn"
needless_pass_by_value = "warn"
too_many_arguments = "warn"
too_many_lines = "warn"
trivially_copy_pass_by_ref = "warn"
vec_init_then_push = "warn"

[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unused_must_use = "deny"

[profile.bench]
debug = 2

[profile.perf-cpu]
lto = "thin"
codegen-units = 1
debug = 1
incremental = false
inherits = "release"
strip = "none"

[profile.perf-debug]
opt-level = 1
debug = 2
incremental = false
inherits = "dev"

[profile.perf-heap]
lto = "off"
codegen-units = 1
debug = 1
incremental = false
inherits = "release"
strip = "none"

[profile.release]
debug = 2
