content: [package]
  name = "dose-response"
  version = "2.0.0-dev"
  description = "Roguelike game where you play an addict"
  authors = ["Tomas Sedovic <tomas@sedovic.cz>"]
  homepage = "https://tryjumping.com/dose-response-roguelike/"
  repository = "https://github.com/tryjumping/dose-response"
  edition = "2024"
  license = "AGPL-3.0-or-later"
  build = "build.rs"
  default-run = "dose-response"
  exclude = ["bin/*", "scripts/*", "replays/*", "screenshots/*", "ci/*", "Makefile", "e2e-tests",
             "web-src/*", "*.js", "*.css", "*.html",
             "notes.org", "SAVEDGAME.sav", "out-dir-path", "dose-response.log",
             "videos/*", "*.mp4", "third-party-licenses.html"]
  
  
  
  [[bin]]
  name = "dose-response"
  path = "src/main.rs"
  
  [[bench]]
  name = "pathfinding"
  harness = false
  
  [dependencies]
  # Glutin-based graphics stack
  glutin-winit = { version = "0.5.0", default-features = false, features = ["x11", "egl"], optional = true }
  glutin = { version = "0.32", default-features = false, optional = true }
  winit = { version = "0.30", default-features = false, optional = true }
  raw-window-handle = { version = "0.6", optional = true }
  
  # SDL3-based graphics stack
  sdl3 = { version = "0.14.36", default-features = false, optional = true }
  
  # SDL2-based graphics stack
  sdl2 = { version = "0.38", optional = true }
  
  bincode = "1.3"  # For serialising the game save state into a binary format
  bitflags = "1.2"
  clap = { version = "2.33.3", optional = true }
  chrono = { version = "0.4.19", optional = true }
  #egui = { git = "https://github.com/emilk/emigui.git" }
  #egui = { git = "https://github.com/tomassedovic/emigui.git" }
  #egui = { path = "../../3pc/src/github.com/emilk/emigui/egui" }
  # NOTE: by disabling default features, we're excluding the bundled font
  egui = { version = "0.31", default-features = false }
  flate2 = "1.0"
  game-loop = {version = "1.3.0", default-features = false, optional = true}
  gilrs = "0.10.2"
  gl = { version = "0.14", optional = true }
  image = { version = "0.23.14", optional = true }
  line_drawing = "0.8"
  log = "0.4.14"
  log-panics = { version = "2.0", features = ["with-backtrace"], optional = true }
  num-rational = { version = "0.4.0", default-features = false, features = ["serde"] }
  oorandom = { version = "11.1.3" }
  rodio = { version = "0.21", features = ["vorbis", "playback"], default-features = false }
  serde = { version = "1.0", features = ["derive"] }
  serde_json = "1.0"
  simplelog = { version = "0.12.0", default-features = false, features = [], optional = true }
  time = { version = "0.3.14" }
  toml_edit = "0.2.1"
  webbrowser = "0.5.5"
  blake3 = "=1.5.4"
  
  [build-dependencies]
  rusttype = "0.8"
  image = "0.23.14"
  
  [dev-dependencies]
  bencher = "0.1"
  
  # Only compile winres on Windows targets.
  [target.'cfg(windows)'.build-dependencies]
  winres = "0.1"
  
  [target.'cfg(target_os="macos")'.dependencies]
  #sdl3 = { version = "0.14.36", features = ["build-from-source"] }
  
  [target.'cfg(target_os="windows")'.dependencies]
  #sdl3 = { version = "0.14.36", features = ["build-from-source"] }
  sdl2 = { version = "0.38", features = ["bundled"] }
  
  [target.'cfg(target_os="linux")'.dependencies]
  # NOTE: only a single version of SDL can be compiled in at a time, it seems
  #sdl3 = { version = "0.14.36", features = ["build-from-source"] }
  sdl2 = { version = "0.38", features = ["bundled"] }
  
  
  [features]
  # NOTE: Add the `mobile-ui` feature to switch to the mobile UI size
  # default = ["dev", "mobile-ui"]
  default = ["dev"]
  # NOTE: Add the `recording` feature to test/record the trailer mode
  prod = ["desktop", "sdl2-backend"]
  dev = ["desktop", "sdl2-backend", "cheating", "replay", "stats", "verifications"]
  test = ["dev", "prod", "all-backends"]
  # NOTE: there's a runtime crash when both SDL2 and SDL3 backends are enabled.
  #
  # We keep the `all-backends` feature to be able to run cargo clippy
  # etc., but we'll only keep the SDL2 backend available in the devprod
  # builds.
  all-backends = ["glutin-backend", "sdl3-backend", "sdl2-backend"]
  desktop = ["cli", "fullscreen", "chrono"]
  recording = ["prod", "replay"]
  # TODO: add a "trailer" feature for the gameplay (not UI) changes under "recording"?
  # So you can record a normal game / replay too.
  
  mobile-ui = []
  cheating = []
  cli = ["clap", "simplelog", "log-panics"]
  fullscreen = []
  glutin-backend = ["glutin", "winit", "gl", "image", "glutin-winit", "raw-window-handle", "game-loop"]
  sdl3-backend = ["sdl3", "gl", "image"]
  sdl2-backend = ["sdl2", "gl", "image"]
  missed-frames = []
  replay = ["chrono"]
  stats = []
  verifications = []
  linux-extra-features = []
  macos-extra-features = []
  windows-extra-features = []
  
  
  [profile.release]
  codegen-units = 1
  lto = true
  # We only use debug info for profiling, but not otherwise
  #debug = true
  
  [lints.rust]
  overflowing_literals = "deny"
  unsafe_code = "deny"
  rust_2018_idioms = "deny"
  rust_2018_compatibility = "deny"
  unused_extern_crates = "deny"
  nonstandard_style = "deny"
  future_incompatible = "deny"
  missing_copy_implementations = "warn"
  
  [lints.clippy]
  lint_groups_priority = "allow"
  explicit_iter_loop = "allow"
  identity_op = "allow"
  wildcard_imports = "allow"
  match_bool = "allow"
  single_match_else = "allow"
  manual_slice_size_calculation = "allow"
  match_wildcard_for_single_variants = "allow"
  match_same_arms = "allow"
  default_trait_access = "allow"
  ptr_as_ptr = "allow"
  float_cmp = "allow"
  from_iter_instead_of_collect = "allow"
  collapsible_else_if = "allow"
  bool_assert_comparison = "allow"
  type_complexity = "allow"
  
  cast_lossless = "deny"
  redundant_closure_for_method_calls = "deny"
  cloned_instead_of_copied = "deny"
  unnested_or_patterns = "deny"
  if_not_else = "deny"
  map_unwrap_or = "deny"
  unreadable_literal = "deny"
  unseparated_literal_suffix = "deny"
  doc_markdown = "deny"
  
  # These lints guard against common runtime panic situations:
  expect_used = "deny"
  unwrap_used = "deny"
  ok_expect = "deny"
  panic = "deny"
  manual_strip = "deny"
  await_holding_refcell_ref = "deny"
  unwrap_in_result = "deny"
  # NOTE: these two deny direct indexing into arrays and the
  # `unreachable!` macro. These are definitely things that could crash
  # the game at runtime. But also a massive pain to code around.
  #
  # Worth reconsidering at some point, but keeping commented out for now.
  #indexing_slicing = "deny"
  #unreachable = "deny"
  