content: [workspace]
  exclude = [
    "nativelink-config/generate-stores-config",
    "tools/generate-bazel-rc",
  ]
  resolver = "2"
  
  [package]
  edition = "2024"
  name = "nativelink"
  rust-version = "1.87.0"
  version = "0.7.3"
  
  [profile.release]
  lto = true
  
  # Prefer this profile in CI, for instance via `cargo test --all --profile=smol`.
  # It reduces the size of the `target` directory from ~12GB to ~1GB.
  [profile.smol]
  debug = false
  inherits = "dev"
  opt-level = "z"
  strip = true
  
  [[bin]]
  name = "nativelink"
  
  [features]
  nix = ["nativelink-worker/nix"]
  
  # Enable this to get extra debug about workers that are not being used by the CAS
  # for some reason. We don't enable this by default, as it's part of a hot path in
  # the scheduling system, and also that a worker not matching isn't necessarily bad.
  worker_find_logging = [
    "nativelink-scheduler/worker_find_logging",
    "nativelink-util/worker_find_logging",
  ]
  
  [dependencies]
  nativelink-config = { path = "nativelink-config" }
  nativelink-error = { path = "nativelink-error" }
  nativelink-scheduler = { path = "nativelink-scheduler" }
  nativelink-service = { path = "nativelink-service" }
  nativelink-store = { path = "nativelink-store" }
  nativelink-util = { path = "nativelink-util" }
  nativelink-worker = { path = "nativelink-worker" }
  
  async-lock = { version = "3.4.0", features = ["std"], default-features = false }
  axum = { version = "0.8.3", default-features = false }
  clap = { version = "4.5.35", features = ["derive"] }
  futures = { version = "0.3.31", default-features = false }
  hyper = "1.6.0"
  hyper-util = "0.1.11"
  mimalloc = "0.1.44"
  rustls-pemfile = { version = "2.2.0", features = [
    "std",
  ], default-features = false }
  tokio = { version = "1.44.1", features = [
    "fs",
    "io-util",
    "rt-multi-thread",
    "signal",
  ], default-features = false }
  tokio-rustls = { version = "0.26.2", default-features = false, features = [
    "ring",
  ] }
  tonic = { version = "0.13.0", features = [
    "tls-ring",
    "transport",
  ], default-features = false }
  tower = { version = "0.5.2", default-features = false }
  tracing = { version = "0.1.41", default-features = false }
  
  [workspace.cargo-features-manager.keep]
  async-lock = ["std"]
  aws-sdk-s3 = ["rt-tokio"]
  aws-smithy-runtime = ["test-util"]
  # This causes blake3 to detect SIMD capabilities at runtime.
  blake3 = ["std"]
  pretty_assertions = ["std"]
  redis-test = ["aio"]
  serial_test = ["async"]
  tokio = ["fs", "io-util", "rt-multi-thread", "signal"]
  tokio-stream = ["fs"]
  tonic = ["tls", "transport"]
  tonic-build = ["prost"]
  uuid = ["serde", "v4"]
  
  [workspace.lints.rust]
  ambiguous-glob-reexports = "deny"
  clashing-extern-declarations = "deny"
  const-item-mutation = "deny"
  dangling-pointers-from-temporaries = "deny"
  deref-nullptr = "deny"
  drop-bounds = "deny"
  future-incompatible = "deny"
  hidden-glob-reexports = "deny"
  improper-ctypes = "deny"
  improper-ctypes-definitions = "deny"
  invalid-from-utf8 = "deny"
  invalid-macro-export-arguments = "deny"
  invalid-nan-comparisons = "deny"
  invalid-reference-casting = "deny"
  invalid-value = "deny"
  opaque-hidden-inferred-bound = "deny"
  overlapping-range-endpoints = "deny"
  suspicious-double-ref-op = "deny"
  unconditional-recursion = "deny"
  unexpected-cfgs = "deny"
  unnameable-test-items = "deny"
  unsafe-op-in-unsafe-fn = "deny"
  unstable-syntax-pre-expansion = "deny"
  
  keyword-idents = "warn"
  let-underscore = "warn"
  macro-use-extern-crate = "warn"
  meta-variable-misuse = "warn"
  missing-abi = "warn"
  missing-copy-implementations = "warn"
  missing-debug-implementations = "warn"
  noop-method-call = "warn"
  single-use-lifetimes = "warn"
  trivial-casts = "warn"
  trivial-numeric-casts = "warn"
  unreachable-pub = "warn"
  unused = { level = "warn", priority = -1 }
  unused-import-braces = "warn"
  unused-lifetimes = "warn"
  unused-qualifications = "warn"
  variant-size-differences = "warn"
  
  [workspace.lints.clippy]
  
  # Global configuration
  all = { level = "warn", priority = -1 }
  nursery = { level = "warn", priority = -1 }
  pedantic = { level = "warn", priority = -1 }
  
  # Restriction Denies with default priority
  alloc-instead-of-core = "deny"
  as-underscore = "deny"
  elidable-lifetime-names = "deny"
  semicolon-if-nothing-returned = "deny"
  std-instead-of-core = "deny"
  todo = "deny"
  
  # Restriction Warnings with default priority
  dbg-macro = "warn"
  decimal-literal-representation = "warn"
  get-unwrap = "allow"                    # TODO(jhpratt) Flip
  missing-docs-in-private-items = "allow" # TODO(jhpratt) Flip
  print-stdout = "warn"
  unimplemented = "warn"
  unwrap-in-result = "allow"              # TODO(jhpratt) Flip
  unwrap-used = "allow"                   # TODO(jhpratt) Flip
  use-debug = "warn"
  
  # Nursery denies we want once they get out of Nursery
  missing-const-for-fn = "deny"
  
  # Nursery overrides that are either buggy or we want to fix
  cognitive-complexity = { level = "allow", priority = 1 }        # TODO(palfrey) Flip
  iter-with-drain = { level = "allow", priority = 1 }             # TODO(jhpratt) Flip
  option-if-let-else = { level = "allow", priority = 1 }          # rust-lang/rust-clippy#8829
  redundant-pub-crate = { level = "allow", priority = 1 }         # rust-lang/rust-clippy#5369
  significant-drop-tightening = { level = "allow", priority = 1 } # TODO(jhpratt) Flip
  too-long-first-doc-paragraph = { level = "allow" }              # TODO(jhpratt) Flip
  uninhabited-references = { level = "allow", priority = 1 }      # rust-lang/rust-clippy#11984
  
  # TODO(palfrey): Remove these to get to pedantic.
  cast_possible_truncation = { level = "allow", priority = 1 }
  cast_possible_wrap = { level = "allow", priority = 1 }
  cast_precision_loss = { level = "allow", priority = 1 }
  cast_sign_loss = { level = "allow", priority = 1 }
  large_futures = { level = "allow", priority = 1 }
  missing_errors_doc = { level = "allow", priority = 1 }
  missing_fields_in_debug = { level = "allow", priority = 1 }
  missing_panics_doc = { level = "allow", priority = 1 }
  must_use_candidate = { level = "allow", priority = 1 }
  ref_option = { level = "allow", priority = 1 }
  too_many_lines = { level = "allow", priority = 1 }
  unused_async = { level = "allow", priority = 1 }
  unused_self = { level = "allow", priority = 1 }
  