content: [workspace]
  resolver = "2"
  members = [
    "crates/*",
    "examples/*",
    "bindings/gloss_py",
    "tests",
  ]
  
  # =====================================================================
  [workspace.package]
  authors = ["Radu Alexandru Rosu <alex@meshcapade.com>", "Aman Shenoy <aman@meshcapade.com>"]
  edition = "2021"
  rust-version = "1.85"
  version = "0.7.0"
  description = "A light-weight Physically Based Renderer"
  license = "MIT"
  readme = "README.md"
  repository = "https://github.com/Meshcapade/gloss"
  
  [workspace.metadata.docs.rs]
  targets = ["lib"]
  features = ["doc"]
  
  # =====================================================================
  [workspace.dependencies]
  gloss-renderer = { path = "crates/gloss_renderer", version = "0.7" }
  easy-wgpu = { path = "crates/easy_wgpu", version = "0.7"}
  gloss-utils = { path = "crates/gloss_utils", version = "0.7"}
  gloss-img = { path = "crates/gloss_img", version = "0.7"}
  gloss-hecs = { path = "crates/gloss_hecs", version = "0.7", features = ["macros"]}
  gloss-geometry = { path = "crates/gloss_geometry", version = "0.7"}
  gloss-burn-multibackend = { path = "crates/gloss_burn_multibackend", version = "0.7"}
  wgpu-burn-interop = { path = "crates/wgpu_burn_interop", version = "0.7"}
  wgpu-burn-global-device = { path = "crates/wgpu_burn_global_device", version = "0.7"}
  
  # =====================================================================
  # Third-Party crates
  # =====================================================================
  type-map = "0.5.0" #needed for egui_renderer
  thiserror = "1.0"
  cfg-if = "1"
  anyhow = "1.0"
  bytemuck = { version = "1.12", features = [ "derive" ] }
  env_logger = "0.10"
  log = {version = "0.4", features = ["std"]}
  pollster = "0.3"
  libc = "0.2"
  winit = { version = "0.30.7", default-features = false, features = ["rwh_06", "x11"] } 
  wgpu       = { version = "25.0.0",  default-features = false, features = ["wgsl", "spirv", "webgl", "metal", "webgpu"] } 
  num-traits     = { version = "0.2", default-features = false }
  image = { version= "0.25.5", default-features = false, features=["jpeg", "png", "tiff"] } #TODO maybe replace it with zune-image
  nalgebra = {version = "0.32", default-features = false, features = ["std", "serde-serialize-no-std"]} #TODO: Update when numpy updates dependency
  nalgebra-glm = "0.18"
  derive_more = { version = "0.99", default-features = false, features = ["deref", "deref_mut", "iterator"]}
  tobj = { version = "4.0", features=["async"]}
  obj-exporter = "0.2"
  futures = "0.3"
  futures-intrusive = "0.5"
  burn = { version = "0.18", default-features = false, features=["ndarray", "wgpu", "candle", "autotune"]}
  cubecl={ version="0.6.0",  default-features = false}
  burn-cubecl = { version = "0.18", default-features = false}
  egui = {version = "0.32", default-features = false, features= ["default_fonts"]}
  egui-wgpu = {version = "0.32", default-features = false}
  egui-winit = {version = "0.32", default-features = false, features = ["x11"] } #disabled arboard feature because it doesn't work on wasm
  epaint = {version = "0.32", default-features = false, features =["bytemuck"]}
  enum-map = "2.6.0"
  smallvec = "1.11"
  encase = { version = "0.9", features = ["nalgebra"] }
  wasm-timer = "0.2"
  include-wgsl-oil = "0.2.8"
  ktx2 = "0.3"
  config = { version = "0.14.0", default-features = false, features = ["toml"]} 
  serde = { version = "1.0", features = ["derive"] }
  toml = { version = "0.8" }
  ndarray = { version = "0.16"  }
  ply-rs = "0.1.3"
  itertools = "0.12"
  strum = "0.26.3"
  strum_macros = "0.26.3"
  #egui and half" pull different versions of the getrandom crate transitivelly. And I want to enable the js feature for both:
  # 1) Alias the 0.2.x instance of getrandom, disable default features, turn on "js"
  getrandom02 = { package = "getrandom", version = "0.2", default-features = false, features = ["js"] }
  # 2) Alias the 0.3.x instance of getrandom, disable default features, turn on "js"
  getrandom03 = { package = "getrandom", version = "0.3", default-features = false, features = ["wasm_js"] }
  static_assertions = "1.1.0"
  abi_stable = "0.11.3"
  re_memory = "0.24"
  once_cell = "1.19"
  futures-lite="2.6"
  future="0.3"
  gltf = "1.4.0"
  # =====================================================================
  # Dependencies for wasm https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window/#added-support-for-the-web
  # =====================================================================
  console_error_panic_hook = "0.1.6"
  console_log = "1.0"
  wasm-bindgen = "=0.2.100"
  wasm-bindgen-futures = "0.4"
  web-sys = { version = "0.3", features = [
      "Request",
      "RequestInit",
      "RequestMode",
      "Response",
      "Document",
      "Window",
      "Element",
  ]}
  js-sys = "0.3"
  
  # =====================================================================
  [profile.dev]
  opt-level = 1   # Make debug builds run faster
  panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways).
  
  # =====================================================================
  # Optimize all dependencies even in debug builds (does not affect workspace packages):
  # =====================================================================
  [profile.dev.package."*"]
  opt-level = 3
  
  # =====================================================================
  [profile.release]
  # debug = true # good for profilers
  # TODO need more profiling but if we enable the following line the code seems slower
  # panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways).
  lto = true
  
  # =====================================================================
  [profile.bench]
  debug = true
  
  [profile.release-thin-lto]
  inherits = "release"
  lto = "thin"
  
  # =====================================================================
  # We set priority lower so that these lints can overwriteen by other ones with higher priority like the ones we do allow
  # =====================================================================
  [workspace.lints.clippy]
  all = { level = "deny", priority = -1 }
  pedantic = { level = "warn", priority = -1 }
  
  # All the things we do allow. We set higher priority so we overwrite the "all" and "pedantic"
  module_name_repetitions = "allow"  
  must_use_candidate = "allow"
  missing_panics_doc = "allow"
  unused_self = "allow"
  explicit_iter_loop = "allow" #messes with hecs query.iter() and makes them super ugly
  
  # =====================================================================
  # [build]
  # rustc-args = ["-Vv"]