# 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"
name = "game-audio"
version = "0.6.2"
authors = ["p <p@p11c.xyz>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Procedural game audio: generate tones, noise, and pattern-based music without audio files"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://gitlab.com/porky11/game-audio"

[features]
export = [
    "hound",
    "mp3lame-encoder",
]

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

[[bin]]
name = "track-export"
path = "src/bin/track-export.rs"
required-features = ["export"]

[[bin]]
name = "track-play"
path = "src/bin/track-play.rs"

[dependencies.hound]
version = "3.5"
optional = true

[dependencies.mp3lame-encoder]
version = "0.2.2"
optional = true

[dependencies.rodio]
version = "0.22"
default-features = false

[dependencies.thiserror]
version = "2.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rodio]
version = "0.22"
features = [
    "playback",
    "flac",
    "mp3",
    "mp4",
    "vorbis",
    "wav",
    "dither",
]
default-features = false

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

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
    "AudioContext",
    "BaseAudioContext",
    "AudioBuffer",
    "AudioBufferSourceNode",
    "AudioScheduledSourceNode",
    "AudioNode",
    "AudioDestinationNode",
    "AudioParam",
    "GainNode",
]

[lints.clippy]
boxed_local = "allow"
case_sensitive_file_extension_comparisons = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
cognitive_complexity = "allow"
enum_glob_use = "allow"
expect_used = "deny"
float_cmp = "allow"
fn_params_excessive_bools = "allow"
future_not_send = "allow"
implicit_hasher = "allow"
inline_always = "allow"
items_after_statements = "allow"
many_single_char_names = "allow"
match_same_arms = "allow"
missing_const_for_fn = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
missing_transmute_annotations = "deny"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_collect = "allow"
needless_pass_by_value = "allow"
option_if_let_else = "allow"
range_plus_one = "allow"
return_self_not_must_use = "allow"
semicolon_if_nothing_returned = "allow"
similar_names = "allow"
struct_field_names = "allow"
suboptimal_flops = "allow"
suspicious_arithmetic_impl = "allow"
suspicious_operation_groupings = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
trait_duplication_in_bounds = "allow"
trivially_copy_pass_by_ref = "allow"
unchecked_time_subtraction = "allow"
unreadable_literal = "allow"
unwrap_used = "deny"
while_float = "allow"
wildcard_imports = "allow"

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

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

[lints.rust.warnings]
level = "deny"
priority = -2
