[package]
name = "nescript"
version = "0.1.0"
edition = "2021"
description = "A statically-typed compiler for NES game development"
license = "MIT"
default-run = "nescript"

[[bin]]
name = "nescript"
path = "src/main.rs"

# One-shot tile / nametable generator for examples/platformer.ne. Kept in-tree
# (rather than as a Python script) so the repo stays single-language.
[[bin]]
name = "gen_platformer_tiles"
path = "scripts/gen_platformer_tiles.rs"

[dependencies]
clap = { version = "4", features = ["derive"] }
ariadne = "0.4"
image = { version = "0.25", default-features = false, features = ["png"] }

[dev-dependencies]
pretty_assertions = "1"
criterion = "0.5"

[[bench]]
name = "compile"
harness = false

[profile.release]
lto = true
strip = true

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Allow patterns common in compiler code
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
cast_possible_truncation = "allow"
wildcard_imports = "allow"
option_if_let_else = "allow"
match_same_arms = "allow"
unnested_or_patterns = "allow"
missing_const_for_fn = "allow"
too_many_lines = "allow"
single_match_else = "allow"
unnecessary_wraps = "allow"
unused_self = "allow"
enum_glob_use = "allow"
manual_assert = "allow"
vec_init_then_push = "allow"
struct_field_names = "allow"
