packages feed

tracy-profiler-0.1.2.0: tracy-profiler.cabal

cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.38.1.
--
-- see: https://github.com/sol/hpack

name:           tracy-profiler
version:        0.1.2.0
synopsis:       Haskell bindings for Tracy frame profiler
category:       Profiling
homepage:       https://github.com/haskell-game/tracy-profiler#readme
bug-reports:    https://github.com/haskell-game/tracy-profiler/issues
author:         IC Rainbow
maintainer:     aenor.realm@gmail.com
copyright:      2025 IC Rainbow
license:        BSD-3-Clause
license-file:   LICENSE
build-type:     Simple
extra-doc-files:
    README.md
    CHANGELOG.md
    readme.png

source-repository head
  type: git
  location: https://github.com/haskell-game/tracy-profiler

flag enable
  description: Enable to actually call the Tracy functions and produce data. Otherwise the wrappers will be no-ops.
  manual: True
  default: False

flag fibers
  description: Enable if your libtracyclient has this enabled.
  manual: True
  default: False

flag has_callstack
  description: Enable if your libtracyclient has this enabled.
  manual: True
  default: False

flag manual_lifetime
  description: Manually manage profiler lifetime. Enable if your libtracyclient has this enabled.
  manual: True
  default: False

flag on_demand
  description: Don't generate and keep events if there's no connection. Enable if your libtracyclient has this enabled.
  manual: True
  default: False

flag zones_pedantic
  description: Crash when a zone is starting on an unbound thread.
  manual: True
  default: True

flag zones_unsafe
  description: Skip the bound-thread check for zones. This may crash the profile server with "zone ended twice" error.
  manual: True
  default: False

library
  exposed-modules:
      System.Tracy
      System.Tracy.FFI
      System.Tracy.FFI.Types
      System.Tracy.Memory
      System.Tracy.Zone
  other-modules:
      Paths_tracy_profiler
  autogen-modules:
      Paths_tracy_profiler
  hs-source-dirs:
      src
  default-extensions:
      BlockArguments
      DerivingStrategies
      DuplicateRecordFields
      ImportQualifiedPost
      LambdaCase
      NoFieldSelectors
      OverloadedLabels
      OverloadedStrings
      RecordWildCards
      StrictData
      ImplicitParams
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -O2
  build-depends:
      base >=4.16 && <5
    , bytestring
    , text >=2.0 && <3
    , unliftio-core
    , webcolor-labels
  default-language: GHC2021
  if flag(enable)
    cpp-options: -DTRACY_ENABLE
    extra-libraries:
        TracyClient
        stdc++
  if flag(manual_lifetime)
    cpp-options: -DTRACY_MANUAL_LIFETIME
  if flag(on_demand)
    cpp-options: -DTRACY_ON_DEMAND
  if flag(fibers)
    cpp-options: -DTRACY_FIBERS
  if flag(has_callstack)
    cpp-options: -DTRACY_HAS_CALLSTACK
  if flag(zones_pedantic)
    cpp-options: -DZONES_PEDANTIC
  if flag(zones_unsafe)
    cpp-options: -DZONES_UNSAFE

test-suite tracy-profiler-test
  type: exitcode-stdio-1.0
  main-is: Readme.hs
  other-modules:
      Paths_tracy_profiler
  autogen-modules:
      Paths_tracy_profiler
  hs-source-dirs:
      test
  default-extensions:
      BlockArguments
      DerivingStrategies
      DuplicateRecordFields
      ImportQualifiedPost
      LambdaCase
      NoFieldSelectors
      OverloadedLabels
      OverloadedStrings
      RecordWildCards
      StrictData
      ImplicitParams
  ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.16 && <5
    , random
    , text
    , tracy-profiler
    , unliftio-core
  default-language: GHC2021