[package]
name = "nominal-api"
version = "0.1261.0"
edition = "2024"
authors = ["Alexander Hill <alex.hill@nominal.io>"]
description = "API bindings for the Nominal platform"
homepage = "https://nominal.io"
license = "MIT"
readme = "README.md"
# src/ includes pre-generated bindings (gitignored but included via this directive)
include = ["src/", "build.rs", "definitions/"]

[[bin]]
name = "compile-protos"
path = "src/bin/compile_protos.rs"
required-features = ["_build"]

[[bin]]
name = "compile-conjure"
path = "src/bin/compile_conjure.rs"
required-features = ["_build"]

[dependencies]
conjure-error = { version = "5.10.0", optional = true }
conjure-http = { version = "5.10.0", optional = true }
conjure-object = { version = "5.10.0", optional = true }
prost = { version = "0.13.5", optional = true }
tonic = { version = "0.13.1", features = ["transport"], optional = true }
# Used by the compile-conjure and compile-protos pre-gen binaries
conjure-codegen = { version = "5.10.0", optional = true }
tonic-build = { version = "0.13.1", optional = true }
prost-types = { version = "0.13.5", optional = true }

[build-dependencies]
# Optional: only compiled when generate-bindings feature is active.
# dep:conjure-codegen and dep:tonic-build in [features] activate both the
# [dependencies] and [build-dependencies] entries of the same name.
conjure-codegen = { version = "5.10.0", optional = true }
tonic-build = { version = "0.13.1", optional = true }

[features]
default = ["tonic", "conjure"]
# Generate types for the Conjure HTTP API
conjure = ["dep:conjure-error", "dep:conjure-http", "dep:conjure-object"]
# Generate types for gRPC support compatible with Tonic for runtime gRPC client/server functionality
tonic = ["dep:tonic", "dep:prost"]
# Opt-in: regenerate all bindings at build time instead of using the pre-generated source.
# Requires the definitions/ directory to be present (it is, for published crates).
generate-bindings = ["dep:conjure-codegen", "dep:tonic-build"]
# Used by the compile-conjure and compile-protos pre-gen binaries (internal)
_build = ["tonic", "conjure", "dep:conjure-codegen", "dep:tonic-build", "dep:prost-types"]
