content: 
  [package]
  name = "symbiants_pkg"
  version = "0.1.0"
  edition = "2021"
  build = "build.rs"
  
  [lib]
  name = "symbiants_lib"
  crate-type = ["cdylib", "rlib"]
  
  [workspace]
  resolver = "2"
  members = ["rendering", "simulation", "ui"]
  
  [build-dependencies]
  fs_extra = "1.3"
  
  [dependencies]
  simulation = { path = "./simulation" }
  rendering = { path = "./rendering" }
  ui = { path = "./ui" }
  
  bevy = { version = "0.14.0", default-features = false, features = [
    "bevy_asset",
    "bevy_scene",
    "bevy_winit",
    "bevy_render",
    "bevy_core_pipeline",
    "bevy_sprite",
    "bevy_text",
    "default_font",
    "png",
  ] }
  bevy_turborand = { version = "0.9.0" }
  
  # WASM builds require extra dependencies for logging and persisting state to local storage.
  # WASM builds do not require x11 and cannot use dynamic_linking.
  [target.'cfg(target_family = "wasm")'.dependencies]
  console_error_panic_hook = { version = "0.1.7" }
  
  # Linux builds require x11 or wayland for display.
  [target.'cfg(not(target_family = "wasm"))'.dependencies]
  bevy = { version = "0.14.0", default-features = false, features = [
    "x11",
    # TODO: support wayland w/ hardware accelerated GPU rendering. Currently crashes on startup and forces a Docker container restart.
    # https://github.com/bevyengine/bevy/issues/13923 breaks gl rendering for me
    # "wayland",
    # NOTE: If native release builds are introduced then this will need to be excluded, it's excluded automatically for WASM builds.
    "dynamic_linking",
  ] }
  
  [dev-dependencies]
  wasm-bindgen-test = "0.3.42"
  
  [features]
  dev-inspector = ["ui/dev-inspector"]
  
  # Enable a small amount of optimization in debug mode
  [profile.dev]
  opt-level = 1
  
  # Enable high optimizations for dependencies (incl. Bevy), but not for our code:
  [profile.dev.package."*"]
  opt-level = 3
  
  # Remove expensive debug assertions due to <https://github.com/bevyengine/bevy/issues/14291>
  [profile.dev.package.wgpu-types]
  debug-assertions = false
  
  # Don't change profile.release away from WASM or it'll break Trunk: https://github.com/trunk-rs/trunk/issues/605
  [profile.release]
  # Compile the entire crate as one unit.
  # Slows compile times, marginal improvements.
  codegen-units = 1
  # Do a second optimization pass over the entire program, including dependencies.
  # Slows compile times, marginal improvements.
  lto = "thin"
  # Optimize with size in mind (also try "z", sometimes it is better).
  # Slightly slows compile times, great improvements to file size and runtime performance.
  opt-level = "s"
  # Strip all debugging information from the binary to slightly reduce file size.
  strip = "debuginfo"