content: # {{{ Workspace
  
  [workspace]
  members = ["fht-compositor-config", "fht-compositor-ipc"]
  resolver = "2"
  
  [workspace.package]
  version = "25.3.1"
  description = "A dynamic tiling Wayland compositor"
  authors = ["Nadjib Ferhat <nferhat20@gmail.com>"]
  license = "GPL-3.0"
  edition = "2021"
  repository = "https://github.com/nferhat/fht-compositor"
  
  [workspace.dependencies]
  anyhow = "1.0.79"
  clap = { version = "4.5.42", features = ["derive", "string"] }
  tracing = "0.1.40"
  tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
  serde_json = "1.0.134"
  serde = { version = "1.0.217", features = ["derive"] }
  
  [workspace.dependencies.smithay]
  git = "https://github.com/smithay/Smithay"
  rev = "9ccbd35f51842934f22b5a85ca0e3be1b99b27f2"
  default-features = false
  
  [workspace.dependencies.smithay-drm-extras]
  git = "https://github.com/Smithay/Smithay"
  rev = "9ccbd35f51842934f22b5a85ca0e3be1b99b27f2"
  
  [profile.opt]
  inherits = "release"
  codegen-units = 1
  lto = "fat"
  opt-level = 3
  
  [profile.dev]
  opt-level = 3
  
  
  # }}}
  
  # {{{ fht-compositor
  
  [package]
  name = "fht-compositor"
  version.workspace = true
  description.workspace = true
  authors.workspace = true
  license.workspace = true
  edition.workspace = true
  repository.workspace = true
  lints.workspace = true
  readme = "README.md"
  rust-version = "1.85"
  
  [dependencies]
  anyhow.workspace = true
  tracing.workspace = true
  tracing-subscriber.workspace = true
  smithay = { workspace = true, features = [
      "desktop",
      "wayland_frontend", # Provide abstractions for wayland stuff
      "renderer_glow",    # Default renderer used everywhere
      "backend_gbm",      # required for pipewire madness
      "use_system_lib",
      "backend_egl",      # EGL support for wayland
      "use_system_lib",
      "backend_egl",      # EGL support for wayland
      "backend_gbm",      # libgbm, needed for many things
      "backend_libinput", # Input handling
  ] }
  calloop = { version = "0.14.3", features = ["executor", "futures-io"] }
  smithay-drm-extras = { workspace = true, optional = true }
  bitflags = "2.9.1"
  thiserror = "2.0.12"
  libc = "0.2.155"
  zbus = { version = "5.5.0", optional = true }
  zvariant = { version = "5.4.0", features = [
      "option-as-array",
  ], optional = true }
  pipewire = { git = "https://gitlab.freedesktop.org/pipewire/pipewire-rs.git", optional = true, features = [
      "v0_3_33",
  ] }
  xcursor = "0.3.5"
  fht-compositor-config.path = "./fht-compositor-config"
  glam = "0.30.5"
  egui = "0.32"
  egui_glow = "0.32"
  serde.workspace = true
  serde_json.workspace = true
  fht-compositor-ipc = { path = "./fht-compositor-ipc", features = ["clap"] }
  fht-animation = { git = "https://github.com/nferhat/fht-animation", version = "0.1.0" }
  # FIXME: We use this instead of std::sync::MappedMutexGuard
  # SEE: tracking issue for nightly flag: https://github.com/rust-lang/rust/issues/117108
  safer_owning_ref = "0.5.0"
  async-channel = "2.3.1"
  async-io = "2.3.4"
  clap.workspace = true
  clap_complete = "4.5.38"
  xdg = "3.0.0"
  tracy-client = { version = "0.18.0", default-features = false }
  serde_repr = "0.1.20"
  libdisplay-info = "0.3.0"
  drm-ffi = "0.9.0"
  sd-notify = { version = "0.4.5", optional = true }
  futures-util = { version = "0.3.31", features = ["std", "io"] }
  
  [features]
  default = ["winit-backend", "udev-backend", "headless-backend", "all-portals"]
  
  # Marker feature to enable D-Bus connectivity.
  #
  # You should not enable this yourself, this is meant to be used by compositor
  # feature dependencies.
  dbus = ["zbus", "zvariant"]
  
  # Enable the winit backend.
  #
  # This allows the compositor to run under a winit window.
  #
  # NOTE: Although this backend works, it's not explicity supported, since its only here for
  # developement. For all regular usage, please use the udev backend.
  winit-backend = [
      "smithay/backend_winit",
      "smithay/renderer_glow",
      "smithay/backend_drm",
  ]
  
  # Enable the winit backend.
  #
  # This allows the compositor to run under a libseat session.
  udev-backend = [
      "smithay-drm-extras",
      "smithay/backend_libinput",
      "smithay/backend_udev",
      "smithay/backend_drm",
      "smithay/backend_gbm",
      "smithay/backend_vulkan",
      "smithay/backend_egl",
      "smithay/backend_session_libseat",
      "smithay/renderer_multi",
  ]
  
  # A headless backend.
  # ---
  # This backend is for pure testing purposes. You are not expected to use this nor to compile this.
  # It's used when testing the IPC and stuff that doesn't require a graphical instance running
  headless-backend = []
  
  # Enable profiling with tracy
  #
  # You should **NOT** enable this unless you want to profile compositor performance.
  # This will automatically stream compositor data to localhost:DEFAULT_PORT.
  profile-with-tracy = ["tracy-client/default"]
  profile-with-tracy-allocations = ["profile-with-tracy"]
  
  # Marker feature to enable all supported portals.
  all-portals = ["xdg-screencast-portal"]
  
  # Enable xdg-screencast portal support
  xdg-screencast-portal = ["pipewire", "dbus", "smithay/backend_gbm"]
  
  # Enable integration with systemd.
  systemd = ["dep:sd-notify"]
  
  # }}}
  
  # {{{ Lints
  
  # For the sake of code correctness, we force quite aggressive lints.
  #
  # In the past I used to program without much though about this, but having lints to guide
  # your coding habits is quite necessary for such a large project.
  
  [workspace.lints.rust]
  rust_2018_idioms = { level = "deny", priority = -1 }
  missing_debug_implementations = "deny"
  mismatched_lifetime_syntaxes = "allow"
  
  [workspace.lints.clippy]
  pedantic = { level = "forbid", priority = -1 }
  ignored-unit-patterns = "allow"
  module-name-repetitions = "allow"
  too-many-lines = "allow"
  too-many-arguments = "allow"
  type-complexity = "allow"
  semicolon-if-nothing-returned = "deny"
  trivially-copy-pass-by-ref = "deny"
  default-trait-access = "deny"
  match-wildcard-for-single-variants = "deny"
  redundant-closure-for-method-calls = "deny"
  filter-map-next = "deny"
  manual-let-else = "deny"
  unused-async = "deny"
  from-over-into = "allow"
  needless-borrow = "deny"
  new-without-default = "deny"
  useless-conversion = "deny"
  redundant-static-lifetimes = "allow"
  missing-transmute-annotations = "allow" # we always do implicit transmutes
  
  # }}}
  
  # vim: foldmethod=marker
  